Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/DOTA_devkit/poly_nms_gpu/poly_nms.cpp
Views: 475
/* Generated by Cython 0.29.14 */12#define PY_SSIZE_T_CLEAN3#include "Python.h"4#ifndef Py_PYTHON_H5#error Python headers needed to compile C extensions, please install development version of Python.6#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)7#error Cython requires Python 2.6+ or Python 3.3+.8#else9#define CYTHON_ABI "0_29_14"10#define CYTHON_HEX_VERSION 0x001D0EF011#define CYTHON_FUTURE_DIVISION 012#include <stddef.h>13#ifndef offsetof14#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )15#endif16#if !defined(WIN32) && !defined(MS_WINDOWS)17#ifndef __stdcall18#define __stdcall19#endif20#ifndef __cdecl21#define __cdecl22#endif23#ifndef __fastcall24#define __fastcall25#endif26#endif27#ifndef DL_IMPORT28#define DL_IMPORT(t) t29#endif30#ifndef DL_EXPORT31#define DL_EXPORT(t) t32#endif33#define __PYX_COMMA ,34#ifndef HAVE_LONG_LONG35#if PY_VERSION_HEX >= 0x0207000036#define HAVE_LONG_LONG37#endif38#endif39#ifndef PY_LONG_LONG40#define PY_LONG_LONG LONG_LONG41#endif42#ifndef Py_HUGE_VAL43#define Py_HUGE_VAL HUGE_VAL44#endif45#ifdef PYPY_VERSION46#define CYTHON_COMPILING_IN_PYPY 147#define CYTHON_COMPILING_IN_PYSTON 048#define CYTHON_COMPILING_IN_CPYTHON 049#undef CYTHON_USE_TYPE_SLOTS50#define CYTHON_USE_TYPE_SLOTS 051#undef CYTHON_USE_PYTYPE_LOOKUP52#define CYTHON_USE_PYTYPE_LOOKUP 053#if PY_VERSION_HEX < 0x0305000054#undef CYTHON_USE_ASYNC_SLOTS55#define CYTHON_USE_ASYNC_SLOTS 056#elif !defined(CYTHON_USE_ASYNC_SLOTS)57#define CYTHON_USE_ASYNC_SLOTS 158#endif59#undef CYTHON_USE_PYLIST_INTERNALS60#define CYTHON_USE_PYLIST_INTERNALS 061#undef CYTHON_USE_UNICODE_INTERNALS62#define CYTHON_USE_UNICODE_INTERNALS 063#undef CYTHON_USE_UNICODE_WRITER64#define CYTHON_USE_UNICODE_WRITER 065#undef CYTHON_USE_PYLONG_INTERNALS66#define CYTHON_USE_PYLONG_INTERNALS 067#undef CYTHON_AVOID_BORROWED_REFS68#define CYTHON_AVOID_BORROWED_REFS 169#undef CYTHON_ASSUME_SAFE_MACROS70#define CYTHON_ASSUME_SAFE_MACROS 071#undef CYTHON_UNPACK_METHODS72#define CYTHON_UNPACK_METHODS 073#undef CYTHON_FAST_THREAD_STATE74#define CYTHON_FAST_THREAD_STATE 075#undef CYTHON_FAST_PYCALL76#define CYTHON_FAST_PYCALL 077#undef CYTHON_PEP489_MULTI_PHASE_INIT78#define CYTHON_PEP489_MULTI_PHASE_INIT 079#undef CYTHON_USE_TP_FINALIZE80#define CYTHON_USE_TP_FINALIZE 081#undef CYTHON_USE_DICT_VERSIONS82#define CYTHON_USE_DICT_VERSIONS 083#undef CYTHON_USE_EXC_INFO_STACK84#define CYTHON_USE_EXC_INFO_STACK 085#elif defined(PYSTON_VERSION)86#define CYTHON_COMPILING_IN_PYPY 087#define CYTHON_COMPILING_IN_PYSTON 188#define CYTHON_COMPILING_IN_CPYTHON 089#ifndef CYTHON_USE_TYPE_SLOTS90#define CYTHON_USE_TYPE_SLOTS 191#endif92#undef CYTHON_USE_PYTYPE_LOOKUP93#define CYTHON_USE_PYTYPE_LOOKUP 094#undef CYTHON_USE_ASYNC_SLOTS95#define CYTHON_USE_ASYNC_SLOTS 096#undef CYTHON_USE_PYLIST_INTERNALS97#define CYTHON_USE_PYLIST_INTERNALS 098#ifndef CYTHON_USE_UNICODE_INTERNALS99#define CYTHON_USE_UNICODE_INTERNALS 1100#endif101#undef CYTHON_USE_UNICODE_WRITER102#define CYTHON_USE_UNICODE_WRITER 0103#undef CYTHON_USE_PYLONG_INTERNALS104#define CYTHON_USE_PYLONG_INTERNALS 0105#ifndef CYTHON_AVOID_BORROWED_REFS106#define CYTHON_AVOID_BORROWED_REFS 0107#endif108#ifndef CYTHON_ASSUME_SAFE_MACROS109#define CYTHON_ASSUME_SAFE_MACROS 1110#endif111#ifndef CYTHON_UNPACK_METHODS112#define CYTHON_UNPACK_METHODS 1113#endif114#undef CYTHON_FAST_THREAD_STATE115#define CYTHON_FAST_THREAD_STATE 0116#undef CYTHON_FAST_PYCALL117#define CYTHON_FAST_PYCALL 0118#undef CYTHON_PEP489_MULTI_PHASE_INIT119#define CYTHON_PEP489_MULTI_PHASE_INIT 0120#undef CYTHON_USE_TP_FINALIZE121#define CYTHON_USE_TP_FINALIZE 0122#undef CYTHON_USE_DICT_VERSIONS123#define CYTHON_USE_DICT_VERSIONS 0124#undef CYTHON_USE_EXC_INFO_STACK125#define CYTHON_USE_EXC_INFO_STACK 0126#else127#define CYTHON_COMPILING_IN_PYPY 0128#define CYTHON_COMPILING_IN_PYSTON 0129#define CYTHON_COMPILING_IN_CPYTHON 1130#ifndef CYTHON_USE_TYPE_SLOTS131#define CYTHON_USE_TYPE_SLOTS 1132#endif133#if PY_VERSION_HEX < 0x02070000134#undef CYTHON_USE_PYTYPE_LOOKUP135#define CYTHON_USE_PYTYPE_LOOKUP 0136#elif !defined(CYTHON_USE_PYTYPE_LOOKUP)137#define CYTHON_USE_PYTYPE_LOOKUP 1138#endif139#if PY_MAJOR_VERSION < 3140#undef CYTHON_USE_ASYNC_SLOTS141#define CYTHON_USE_ASYNC_SLOTS 0142#elif !defined(CYTHON_USE_ASYNC_SLOTS)143#define CYTHON_USE_ASYNC_SLOTS 1144#endif145#if PY_VERSION_HEX < 0x02070000146#undef CYTHON_USE_PYLONG_INTERNALS147#define CYTHON_USE_PYLONG_INTERNALS 0148#elif !defined(CYTHON_USE_PYLONG_INTERNALS)149#define CYTHON_USE_PYLONG_INTERNALS 1150#endif151#ifndef CYTHON_USE_PYLIST_INTERNALS152#define CYTHON_USE_PYLIST_INTERNALS 1153#endif154#ifndef CYTHON_USE_UNICODE_INTERNALS155#define CYTHON_USE_UNICODE_INTERNALS 1156#endif157#if PY_VERSION_HEX < 0x030300F0158#undef CYTHON_USE_UNICODE_WRITER159#define CYTHON_USE_UNICODE_WRITER 0160#elif !defined(CYTHON_USE_UNICODE_WRITER)161#define CYTHON_USE_UNICODE_WRITER 1162#endif163#ifndef CYTHON_AVOID_BORROWED_REFS164#define CYTHON_AVOID_BORROWED_REFS 0165#endif166#ifndef CYTHON_ASSUME_SAFE_MACROS167#define CYTHON_ASSUME_SAFE_MACROS 1168#endif169#ifndef CYTHON_UNPACK_METHODS170#define CYTHON_UNPACK_METHODS 1171#endif172#ifndef CYTHON_FAST_THREAD_STATE173#define CYTHON_FAST_THREAD_STATE 1174#endif175#ifndef CYTHON_FAST_PYCALL176#define CYTHON_FAST_PYCALL 1177#endif178#ifndef CYTHON_PEP489_MULTI_PHASE_INIT179#define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)180#endif181#ifndef CYTHON_USE_TP_FINALIZE182#define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)183#endif184#ifndef CYTHON_USE_DICT_VERSIONS185#define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)186#endif187#ifndef CYTHON_USE_EXC_INFO_STACK188#define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)189#endif190#endif191#if !defined(CYTHON_FAST_PYCCALL)192#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)193#endif194#if CYTHON_USE_PYLONG_INTERNALS195#include "longintrepr.h"196#undef SHIFT197#undef BASE198#undef MASK199#ifdef SIZEOF_VOID_P200enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };201#endif202#endif203#ifndef __has_attribute204#define __has_attribute(x) 0205#endif206#ifndef __has_cpp_attribute207#define __has_cpp_attribute(x) 0208#endif209#ifndef CYTHON_RESTRICT210#if defined(__GNUC__)211#define CYTHON_RESTRICT __restrict__212#elif defined(_MSC_VER) && _MSC_VER >= 1400213#define CYTHON_RESTRICT __restrict214#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L215#define CYTHON_RESTRICT restrict216#else217#define CYTHON_RESTRICT218#endif219#endif220#ifndef CYTHON_UNUSED221# if defined(__GNUC__)222# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))223# define CYTHON_UNUSED __attribute__ ((__unused__))224# else225# define CYTHON_UNUSED226# endif227# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))228# define CYTHON_UNUSED __attribute__ ((__unused__))229# else230# define CYTHON_UNUSED231# endif232#endif233#ifndef CYTHON_MAYBE_UNUSED_VAR234# if defined(__cplusplus)235template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }236# else237# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)238# endif239#endif240#ifndef CYTHON_NCP_UNUSED241# if CYTHON_COMPILING_IN_CPYTHON242# define CYTHON_NCP_UNUSED243# else244# define CYTHON_NCP_UNUSED CYTHON_UNUSED245# endif246#endif247#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)248#ifdef _MSC_VER249#ifndef _MSC_STDINT_H_250#if _MSC_VER < 1300251typedef unsigned char uint8_t;252typedef unsigned int uint32_t;253#else254typedef unsigned __int8 uint8_t;255typedef unsigned __int32 uint32_t;256#endif257#endif258#else259#include <stdint.h>260#endif261#ifndef CYTHON_FALLTHROUGH262#if defined(__cplusplus) && __cplusplus >= 201103L263#if __has_cpp_attribute(fallthrough)264#define CYTHON_FALLTHROUGH [[fallthrough]]265#elif __has_cpp_attribute(clang::fallthrough)266#define CYTHON_FALLTHROUGH [[clang::fallthrough]]267#elif __has_cpp_attribute(gnu::fallthrough)268#define CYTHON_FALLTHROUGH [[gnu::fallthrough]]269#endif270#endif271#ifndef CYTHON_FALLTHROUGH272#if __has_attribute(fallthrough)273#define CYTHON_FALLTHROUGH __attribute__((fallthrough))274#else275#define CYTHON_FALLTHROUGH276#endif277#endif278#if defined(__clang__ ) && defined(__apple_build_version__)279#if __apple_build_version__ < 7000000280#undef CYTHON_FALLTHROUGH281#define CYTHON_FALLTHROUGH282#endif283#endif284#endif285286#ifndef __cplusplus287#error "Cython files generated with the C++ option must be compiled with a C++ compiler."288#endif289#ifndef CYTHON_INLINE290#if defined(__clang__)291#define CYTHON_INLINE __inline__ __attribute__ ((__unused__))292#else293#define CYTHON_INLINE inline294#endif295#endif296template<typename T>297void __Pyx_call_destructor(T& x) {298x.~T();299}300template<typename T>301class __Pyx_FakeReference {302public:303__Pyx_FakeReference() : ptr(NULL) { }304__Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }305T *operator->() { return ptr; }306T *operator&() { return ptr; }307operator T&() { return *ptr; }308template<typename U> bool operator ==(U other) { return *ptr == other; }309template<typename U> bool operator !=(U other) { return *ptr != other; }310private:311T *ptr;312};313314#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)315#define Py_OptimizeFlag 0316#endif317#define __PYX_BUILD_PY_SSIZE_T "n"318#define CYTHON_FORMAT_SSIZE_T "z"319#if PY_MAJOR_VERSION < 3320#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"321#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\322PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)323#define __Pyx_DefaultClassType PyClass_Type324#else325#define __Pyx_BUILTIN_MODULE_NAME "builtins"326#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2327#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\328PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)329#else330#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\331PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)332#endif333#define __Pyx_DefaultClassType PyType_Type334#endif335#ifndef Py_TPFLAGS_CHECKTYPES336#define Py_TPFLAGS_CHECKTYPES 0337#endif338#ifndef Py_TPFLAGS_HAVE_INDEX339#define Py_TPFLAGS_HAVE_INDEX 0340#endif341#ifndef Py_TPFLAGS_HAVE_NEWBUFFER342#define Py_TPFLAGS_HAVE_NEWBUFFER 0343#endif344#ifndef Py_TPFLAGS_HAVE_FINALIZE345#define Py_TPFLAGS_HAVE_FINALIZE 0346#endif347#ifndef METH_STACKLESS348#define METH_STACKLESS 0349#endif350#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)351#ifndef METH_FASTCALL352#define METH_FASTCALL 0x80353#endif354typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);355typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,356Py_ssize_t nargs, PyObject *kwnames);357#else358#define __Pyx_PyCFunctionFast _PyCFunctionFast359#define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords360#endif361#if CYTHON_FAST_PYCCALL362#define __Pyx_PyFastCFunction_Check(func)\363((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))364#else365#define __Pyx_PyFastCFunction_Check(func) 0366#endif367#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)368#define PyObject_Malloc(s) PyMem_Malloc(s)369#define PyObject_Free(p) PyMem_Free(p)370#define PyObject_Realloc(p) PyMem_Realloc(p)371#endif372#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1373#define PyMem_RawMalloc(n) PyMem_Malloc(n)374#define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)375#define PyMem_RawFree(p) PyMem_Free(p)376#endif377#if CYTHON_COMPILING_IN_PYSTON378#define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)379#define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)380#else381#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)382#define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)383#endif384#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000385#define __Pyx_PyThreadState_Current PyThreadState_GET()386#elif PY_VERSION_HEX >= 0x03060000387#define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()388#elif PY_VERSION_HEX >= 0x03000000389#define __Pyx_PyThreadState_Current PyThreadState_GET()390#else391#define __Pyx_PyThreadState_Current _PyThreadState_Current392#endif393#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)394#include "pythread.h"395#define Py_tss_NEEDS_INIT 0396typedef int Py_tss_t;397static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {398*key = PyThread_create_key();399return 0;400}401static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {402Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));403*key = Py_tss_NEEDS_INIT;404return key;405}406static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {407PyObject_Free(key);408}409static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {410return *key != Py_tss_NEEDS_INIT;411}412static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {413PyThread_delete_key(*key);414*key = Py_tss_NEEDS_INIT;415}416static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {417return PyThread_set_key_value(*key, value);418}419static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {420return PyThread_get_key_value(*key);421}422#endif423#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)424#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))425#else426#define __Pyx_PyDict_NewPresized(n) PyDict_New()427#endif428#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION429#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)430#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)431#else432#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)433#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)434#endif435#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS436#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)437#else438#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)439#endif440#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)441#define CYTHON_PEP393_ENABLED 1442#define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\4430 : _PyUnicode_Ready((PyObject *)(op)))444#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)445#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)446#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)447#define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)448#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)449#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)450#define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)451#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))452#else453#define CYTHON_PEP393_ENABLED 0454#define PyUnicode_1BYTE_KIND 1455#define PyUnicode_2BYTE_KIND 2456#define PyUnicode_4BYTE_KIND 4457#define __Pyx_PyUnicode_READY(op) (0)458#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)459#define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))460#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)461#define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))462#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))463#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))464#define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)465#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))466#endif467#if CYTHON_COMPILING_IN_PYPY468#define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)469#define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)470#else471#define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)472#define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\473PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))474#endif475#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)476#define PyUnicode_Contains(u, s) PySequence_Contains(u, s)477#endif478#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)479#define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)480#endif481#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)482#define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)483#endif484#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))485#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))486#if PY_MAJOR_VERSION >= 3487#define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)488#else489#define __Pyx_PyString_Format(a, b) PyString_Format(a, b)490#endif491#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)492#define PyObject_ASCII(o) PyObject_Repr(o)493#endif494#if PY_MAJOR_VERSION >= 3495#define PyBaseString_Type PyUnicode_Type496#define PyStringObject PyUnicodeObject497#define PyString_Type PyUnicode_Type498#define PyString_Check PyUnicode_Check499#define PyString_CheckExact PyUnicode_CheckExact500#define PyObject_Unicode PyObject_Str501#endif502#if PY_MAJOR_VERSION >= 3503#define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)504#define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)505#else506#define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))507#define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))508#endif509#ifndef PySet_CheckExact510#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)511#endif512#if CYTHON_ASSUME_SAFE_MACROS513#define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)514#else515#define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)516#endif517#if PY_MAJOR_VERSION >= 3518#define PyIntObject PyLongObject519#define PyInt_Type PyLong_Type520#define PyInt_Check(op) PyLong_Check(op)521#define PyInt_CheckExact(op) PyLong_CheckExact(op)522#define PyInt_FromString PyLong_FromString523#define PyInt_FromUnicode PyLong_FromUnicode524#define PyInt_FromLong PyLong_FromLong525#define PyInt_FromSize_t PyLong_FromSize_t526#define PyInt_FromSsize_t PyLong_FromSsize_t527#define PyInt_AsLong PyLong_AsLong528#define PyInt_AS_LONG PyLong_AS_LONG529#define PyInt_AsSsize_t PyLong_AsSsize_t530#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask531#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask532#define PyNumber_Int PyNumber_Long533#endif534#if PY_MAJOR_VERSION >= 3535#define PyBoolObject PyLongObject536#endif537#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY538#ifndef PyUnicode_InternFromString539#define PyUnicode_InternFromString(s) PyUnicode_FromString(s)540#endif541#endif542#if PY_VERSION_HEX < 0x030200A4543typedef long Py_hash_t;544#define __Pyx_PyInt_FromHash_t PyInt_FromLong545#define __Pyx_PyInt_AsHash_t PyInt_AsLong546#else547#define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t548#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t549#endif550#if PY_MAJOR_VERSION >= 3551#define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))552#else553#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)554#endif555#if CYTHON_USE_ASYNC_SLOTS556#if PY_VERSION_HEX >= 0x030500B1557#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods558#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)559#else560#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))561#endif562#else563#define __Pyx_PyType_AsAsync(obj) NULL564#endif565#ifndef __Pyx_PyAsyncMethodsStruct566typedef struct {567unaryfunc am_await;568unaryfunc am_aiter;569unaryfunc am_anext;570} __Pyx_PyAsyncMethodsStruct;571#endif572573#if defined(WIN32) || defined(MS_WINDOWS)574#define _USE_MATH_DEFINES575#endif576#include <math.h>577#ifdef NAN578#define __PYX_NAN() ((float) NAN)579#else580static CYTHON_INLINE float __PYX_NAN() {581float value;582memset(&value, 0xFF, sizeof(value));583return value;584}585#endif586#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)587#define __Pyx_truncl trunc588#else589#define __Pyx_truncl truncl590#endif591592593#define __PYX_ERR(f_index, lineno, Ln_error) \594{ \595__pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \596}597598#ifndef __PYX_EXTERN_C599#ifdef __cplusplus600#define __PYX_EXTERN_C extern "C"601#else602#define __PYX_EXTERN_C extern603#endif604#endif605606#define __PYX_HAVE__poly_nms607#define __PYX_HAVE_API__poly_nms608/* Early includes */609#include <string.h>610#include <stdio.h>611#include "numpy/arrayobject.h"612#include "numpy/ufuncobject.h"613#include "poly_nms.hpp"614#ifdef _OPENMP615#include <omp.h>616#endif /* _OPENMP */617618#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)619#define CYTHON_WITHOUT_ASSERTIONS620#endif621622typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;623const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;624625#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0626#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0627#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)628#define __PYX_DEFAULT_STRING_ENCODING ""629#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString630#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize631#define __Pyx_uchar_cast(c) ((unsigned char)c)632#define __Pyx_long_cast(x) ((long)x)633#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\634(sizeof(type) < sizeof(Py_ssize_t)) ||\635(sizeof(type) > sizeof(Py_ssize_t) &&\636likely(v < (type)PY_SSIZE_T_MAX ||\637v == (type)PY_SSIZE_T_MAX) &&\638(!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\639v == (type)PY_SSIZE_T_MIN))) ||\640(sizeof(type) == sizeof(Py_ssize_t) &&\641(is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\642v == (type)PY_SSIZE_T_MAX))) )643static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {644return (size_t) i < (size_t) limit;645}646#if defined (__cplusplus) && __cplusplus >= 201103L647#include <cstdlib>648#define __Pyx_sst_abs(value) std::abs(value)649#elif SIZEOF_INT >= SIZEOF_SIZE_T650#define __Pyx_sst_abs(value) abs(value)651#elif SIZEOF_LONG >= SIZEOF_SIZE_T652#define __Pyx_sst_abs(value) labs(value)653#elif defined (_MSC_VER)654#define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))655#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L656#define __Pyx_sst_abs(value) llabs(value)657#elif defined (__GNUC__)658#define __Pyx_sst_abs(value) __builtin_llabs(value)659#else660#define __Pyx_sst_abs(value) ((value<0) ? -value : value)661#endif662static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);663static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);664#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))665#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)666#define __Pyx_PyBytes_FromString PyBytes_FromString667#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize668static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);669#if PY_MAJOR_VERSION < 3670#define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString671#define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize672#else673#define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString674#define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize675#endif676#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))677#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))678#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))679#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))680#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))681#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))682#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))683#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))684#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))685#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))686#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))687#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)688#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)689#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)690#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)691#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)692static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {693const Py_UNICODE *u_end = u;694while (*u_end++) ;695return (size_t)(u_end - u - 1);696}697#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))698#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode699#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode700#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)701#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)702static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);703static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);704static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);705static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);706#define __Pyx_PySequence_Tuple(obj)\707(likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))708static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);709static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);710#if CYTHON_ASSUME_SAFE_MACROS711#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))712#else713#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)714#endif715#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))716#if PY_MAJOR_VERSION >= 3717#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))718#else719#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))720#endif721#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))722#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII723static int __Pyx_sys_getdefaultencoding_not_ascii;724static int __Pyx_init_sys_getdefaultencoding_params(void) {725PyObject* sys;726PyObject* default_encoding = NULL;727PyObject* ascii_chars_u = NULL;728PyObject* ascii_chars_b = NULL;729const char* default_encoding_c;730sys = PyImport_ImportModule("sys");731if (!sys) goto bad;732default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);733Py_DECREF(sys);734if (!default_encoding) goto bad;735default_encoding_c = PyBytes_AsString(default_encoding);736if (!default_encoding_c) goto bad;737if (strcmp(default_encoding_c, "ascii") == 0) {738__Pyx_sys_getdefaultencoding_not_ascii = 0;739} else {740char ascii_chars[128];741int c;742for (c = 0; c < 128; c++) {743ascii_chars[c] = c;744}745__Pyx_sys_getdefaultencoding_not_ascii = 1;746ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);747if (!ascii_chars_u) goto bad;748ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);749if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {750PyErr_Format(751PyExc_ValueError,752"This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",753default_encoding_c);754goto bad;755}756Py_DECREF(ascii_chars_u);757Py_DECREF(ascii_chars_b);758}759Py_DECREF(default_encoding);760return 0;761bad:762Py_XDECREF(default_encoding);763Py_XDECREF(ascii_chars_u);764Py_XDECREF(ascii_chars_b);765return -1;766}767#endif768#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3769#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)770#else771#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)772#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT773static char* __PYX_DEFAULT_STRING_ENCODING;774static int __Pyx_init_sys_getdefaultencoding_params(void) {775PyObject* sys;776PyObject* default_encoding = NULL;777char* default_encoding_c;778sys = PyImport_ImportModule("sys");779if (!sys) goto bad;780default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);781Py_DECREF(sys);782if (!default_encoding) goto bad;783default_encoding_c = PyBytes_AsString(default_encoding);784if (!default_encoding_c) goto bad;785__PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);786if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;787strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);788Py_DECREF(default_encoding);789return 0;790bad:791Py_XDECREF(default_encoding);792return -1;793}794#endif795#endif796797798/* Test for GCC > 2.95 */799#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))800#define likely(x) __builtin_expect(!!(x), 1)801#define unlikely(x) __builtin_expect(!!(x), 0)802#else /* !__GNUC__ or GCC < 2.95 */803#define likely(x) (x)804#define unlikely(x) (x)805#endif /* __GNUC__ */806static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }807808static PyObject *__pyx_m = NULL;809static PyObject *__pyx_d;810static PyObject *__pyx_b;811static PyObject *__pyx_cython_runtime = NULL;812static PyObject *__pyx_empty_tuple;813static PyObject *__pyx_empty_bytes;814static PyObject *__pyx_empty_unicode;815static int __pyx_lineno;816static int __pyx_clineno = 0;817static const char * __pyx_cfilenm= __FILE__;818static const char *__pyx_filename;819820/* Header.proto */821#if !defined(CYTHON_CCOMPLEX)822#if defined(__cplusplus)823#define CYTHON_CCOMPLEX 1824#elif defined(_Complex_I)825#define CYTHON_CCOMPLEX 1826#else827#define CYTHON_CCOMPLEX 0828#endif829#endif830#if CYTHON_CCOMPLEX831#ifdef __cplusplus832#include <complex>833#else834#include <complex.h>835#endif836#endif837#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)838#undef _Complex_I839#define _Complex_I 1.0fj840#endif841842843static const char *__pyx_f[] = {844"poly_nms.pyx",845"__init__.pxd",846"type.pxd",847};848/* BufferFormatStructs.proto */849#define IS_UNSIGNED(type) (((type) -1) > 0)850struct __Pyx_StructField_;851#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)852typedef struct {853const char* name;854struct __Pyx_StructField_* fields;855size_t size;856size_t arraysize[8];857int ndim;858char typegroup;859char is_unsigned;860int flags;861} __Pyx_TypeInfo;862typedef struct __Pyx_StructField_ {863__Pyx_TypeInfo* type;864const char* name;865size_t offset;866} __Pyx_StructField;867typedef struct {868__Pyx_StructField* field;869size_t parent_offset;870} __Pyx_BufFmt_StackElem;871typedef struct {872__Pyx_StructField root;873__Pyx_BufFmt_StackElem* head;874size_t fmt_offset;875size_t new_count, enc_count;876size_t struct_alignment;877int is_complex;878char enc_type;879char new_packmode;880char enc_packmode;881char is_valid_array;882} __Pyx_BufFmt_Context;883884885/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776886* # in Cython to enable them only on the right systems.887*888* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<889* ctypedef npy_int16 int16_t890* ctypedef npy_int32 int32_t891*/892typedef npy_int8 __pyx_t_5numpy_int8_t;893894/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777895*896* ctypedef npy_int8 int8_t897* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<898* ctypedef npy_int32 int32_t899* ctypedef npy_int64 int64_t900*/901typedef npy_int16 __pyx_t_5numpy_int16_t;902903/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778904* ctypedef npy_int8 int8_t905* ctypedef npy_int16 int16_t906* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<907* ctypedef npy_int64 int64_t908* #ctypedef npy_int96 int96_t909*/910typedef npy_int32 __pyx_t_5numpy_int32_t;911912/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":779913* ctypedef npy_int16 int16_t914* ctypedef npy_int32 int32_t915* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<916* #ctypedef npy_int96 int96_t917* #ctypedef npy_int128 int128_t918*/919typedef npy_int64 __pyx_t_5numpy_int64_t;920921/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783922* #ctypedef npy_int128 int128_t923*924* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<925* ctypedef npy_uint16 uint16_t926* ctypedef npy_uint32 uint32_t927*/928typedef npy_uint8 __pyx_t_5numpy_uint8_t;929930/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784931*932* ctypedef npy_uint8 uint8_t933* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<934* ctypedef npy_uint32 uint32_t935* ctypedef npy_uint64 uint64_t936*/937typedef npy_uint16 __pyx_t_5numpy_uint16_t;938939/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785940* ctypedef npy_uint8 uint8_t941* ctypedef npy_uint16 uint16_t942* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<943* ctypedef npy_uint64 uint64_t944* #ctypedef npy_uint96 uint96_t945*/946typedef npy_uint32 __pyx_t_5numpy_uint32_t;947948/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":786949* ctypedef npy_uint16 uint16_t950* ctypedef npy_uint32 uint32_t951* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<952* #ctypedef npy_uint96 uint96_t953* #ctypedef npy_uint128 uint128_t954*/955typedef npy_uint64 __pyx_t_5numpy_uint64_t;956957/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790958* #ctypedef npy_uint128 uint128_t959*960* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<961* ctypedef npy_float64 float64_t962* #ctypedef npy_float80 float80_t963*/964typedef npy_float32 __pyx_t_5numpy_float32_t;965966/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":791967*968* ctypedef npy_float32 float32_t969* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<970* #ctypedef npy_float80 float80_t971* #ctypedef npy_float128 float128_t972*/973typedef npy_float64 __pyx_t_5numpy_float64_t;974975/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800976* # The int types are mapped a bit surprising --977* # numpy.int corresponds to 'l' and numpy.long to 'q'978* ctypedef npy_long int_t # <<<<<<<<<<<<<<979* ctypedef npy_longlong long_t980* ctypedef npy_longlong longlong_t981*/982typedef npy_long __pyx_t_5numpy_int_t;983984/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801985* # numpy.int corresponds to 'l' and numpy.long to 'q'986* ctypedef npy_long int_t987* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<988* ctypedef npy_longlong longlong_t989*990*/991typedef npy_longlong __pyx_t_5numpy_long_t;992993/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":802994* ctypedef npy_long int_t995* ctypedef npy_longlong long_t996* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<997*998* ctypedef npy_ulong uint_t999*/1000typedef npy_longlong __pyx_t_5numpy_longlong_t;10011002/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8041003* ctypedef npy_longlong longlong_t1004*1005* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<1006* ctypedef npy_ulonglong ulong_t1007* ctypedef npy_ulonglong ulonglong_t1008*/1009typedef npy_ulong __pyx_t_5numpy_uint_t;10101011/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8051012*1013* ctypedef npy_ulong uint_t1014* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<1015* ctypedef npy_ulonglong ulonglong_t1016*1017*/1018typedef npy_ulonglong __pyx_t_5numpy_ulong_t;10191020/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8061021* ctypedef npy_ulong uint_t1022* ctypedef npy_ulonglong ulong_t1023* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<1024*1025* ctypedef npy_intp intp_t1026*/1027typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;10281029/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8081030* ctypedef npy_ulonglong ulonglong_t1031*1032* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<1033* ctypedef npy_uintp uintp_t1034*1035*/1036typedef npy_intp __pyx_t_5numpy_intp_t;10371038/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8091039*1040* ctypedef npy_intp intp_t1041* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<1042*1043* ctypedef npy_double float_t1044*/1045typedef npy_uintp __pyx_t_5numpy_uintp_t;10461047/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8111048* ctypedef npy_uintp uintp_t1049*1050* ctypedef npy_double float_t # <<<<<<<<<<<<<<1051* ctypedef npy_double double_t1052* ctypedef npy_longdouble longdouble_t1053*/1054typedef npy_double __pyx_t_5numpy_float_t;10551056/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8121057*1058* ctypedef npy_double float_t1059* ctypedef npy_double double_t # <<<<<<<<<<<<<<1060* ctypedef npy_longdouble longdouble_t1061*1062*/1063typedef npy_double __pyx_t_5numpy_double_t;10641065/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8131066* ctypedef npy_double float_t1067* ctypedef npy_double double_t1068* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<1069*1070* ctypedef npy_cfloat cfloat_t1071*/1072typedef npy_longdouble __pyx_t_5numpy_longdouble_t;1073/* Declarations.proto */1074#if CYTHON_CCOMPLEX1075#ifdef __cplusplus1076typedef ::std::complex< float > __pyx_t_float_complex;1077#else1078typedef float _Complex __pyx_t_float_complex;1079#endif1080#else1081typedef struct { float real, imag; } __pyx_t_float_complex;1082#endif1083static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);10841085/* Declarations.proto */1086#if CYTHON_CCOMPLEX1087#ifdef __cplusplus1088typedef ::std::complex< double > __pyx_t_double_complex;1089#else1090typedef double _Complex __pyx_t_double_complex;1091#endif1092#else1093typedef struct { double real, imag; } __pyx_t_double_complex;1094#endif1095static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);109610971098/*--- Type declarations ---*/10991100/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8151101* ctypedef npy_longdouble longdouble_t1102*1103* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<1104* ctypedef npy_cdouble cdouble_t1105* ctypedef npy_clongdouble clongdouble_t1106*/1107typedef npy_cfloat __pyx_t_5numpy_cfloat_t;11081109/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8161110*1111* ctypedef npy_cfloat cfloat_t1112* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<1113* ctypedef npy_clongdouble clongdouble_t1114*1115*/1116typedef npy_cdouble __pyx_t_5numpy_cdouble_t;11171118/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8171119* ctypedef npy_cfloat cfloat_t1120* ctypedef npy_cdouble cdouble_t1121* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<1122*1123* ctypedef npy_cdouble complex_t1124*/1125typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;11261127/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8191128* ctypedef npy_clongdouble clongdouble_t1129*1130* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<1131*1132* cdef inline object PyArray_MultiIterNew1(a):1133*/1134typedef npy_cdouble __pyx_t_5numpy_complex_t;11351136/* --- Runtime support code (head) --- */1137/* Refnanny.proto */1138#ifndef CYTHON_REFNANNY1139#define CYTHON_REFNANNY 01140#endif1141#if CYTHON_REFNANNY1142typedef struct {1143void (*INCREF)(void*, PyObject*, int);1144void (*DECREF)(void*, PyObject*, int);1145void (*GOTREF)(void*, PyObject*, int);1146void (*GIVEREF)(void*, PyObject*, int);1147void* (*SetupContext)(const char*, int, const char*);1148void (*FinishContext)(void**);1149} __Pyx_RefNannyAPIStruct;1150static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;1151static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);1152#define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;1153#ifdef WITH_THREAD1154#define __Pyx_RefNannySetupContext(name, acquire_gil)\1155if (acquire_gil) {\1156PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\1157__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\1158PyGILState_Release(__pyx_gilstate_save);\1159} else {\1160__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\1161}1162#else1163#define __Pyx_RefNannySetupContext(name, acquire_gil)\1164__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)1165#endif1166#define __Pyx_RefNannyFinishContext()\1167__Pyx_RefNanny->FinishContext(&__pyx_refnanny)1168#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)1169#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)1170#define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)1171#define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)1172#define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)1173#define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)1174#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)1175#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)1176#else1177#define __Pyx_RefNannyDeclarations1178#define __Pyx_RefNannySetupContext(name, acquire_gil)1179#define __Pyx_RefNannyFinishContext()1180#define __Pyx_INCREF(r) Py_INCREF(r)1181#define __Pyx_DECREF(r) Py_DECREF(r)1182#define __Pyx_GOTREF(r)1183#define __Pyx_GIVEREF(r)1184#define __Pyx_XINCREF(r) Py_XINCREF(r)1185#define __Pyx_XDECREF(r) Py_XDECREF(r)1186#define __Pyx_XGOTREF(r)1187#define __Pyx_XGIVEREF(r)1188#endif1189#define __Pyx_XDECREF_SET(r, v) do {\1190PyObject *tmp = (PyObject *) r;\1191r = v; __Pyx_XDECREF(tmp);\1192} while (0)1193#define __Pyx_DECREF_SET(r, v) do {\1194PyObject *tmp = (PyObject *) r;\1195r = v; __Pyx_DECREF(tmp);\1196} while (0)1197#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)1198#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)11991200/* RaiseArgTupleInvalid.proto */1201static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,1202Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);12031204/* RaiseDoubleKeywords.proto */1205static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);12061207/* ParseKeywords.proto */1208static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\1209PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\1210const char* function_name);12111212/* ArgTypeTest.proto */1213#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\1214((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\1215__Pyx__ArgTypeTest(obj, type, name, exact))1216static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);12171218/* IsLittleEndian.proto */1219static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);12201221/* BufferFormatCheck.proto */1222static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);1223static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,1224__Pyx_BufFmt_StackElem* stack,1225__Pyx_TypeInfo* type);12261227/* BufferGetAndValidate.proto */1228#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\1229((obj == Py_None || obj == NULL) ?\1230(__Pyx_ZeroBuffer(buf), 0) :\1231__Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))1232static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,1233__Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);1234static void __Pyx_ZeroBuffer(Py_buffer* buf);1235static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);1236static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };1237static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };12381239/* PyObjectGetAttrStr.proto */1240#if CYTHON_USE_TYPE_SLOTS1241static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);1242#else1243#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)1244#endif12451246/* GetBuiltinName.proto */1247static PyObject *__Pyx_GetBuiltinName(PyObject *name);12481249/* PyDictVersioning.proto */1250#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS1251#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)1252#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)1253#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\1254(version_var) = __PYX_GET_DICT_VERSION(dict);\1255(cache_var) = (value);1256#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\1257static PY_UINT64_T __pyx_dict_version = 0;\1258static PyObject *__pyx_dict_cached_value = NULL;\1259if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\1260(VAR) = __pyx_dict_cached_value;\1261} else {\1262(VAR) = __pyx_dict_cached_value = (LOOKUP);\1263__pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\1264}\1265}1266static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);1267static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);1268static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);1269#else1270#define __PYX_GET_DICT_VERSION(dict) (0)1271#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)1272#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);1273#endif12741275/* GetModuleGlobalName.proto */1276#if CYTHON_USE_DICT_VERSIONS1277#define __Pyx_GetModuleGlobalName(var, name) {\1278static PY_UINT64_T __pyx_dict_version = 0;\1279static PyObject *__pyx_dict_cached_value = NULL;\1280(var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\1281(likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\1282__Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\1283}1284#define __Pyx_GetModuleGlobalNameUncached(var, name) {\1285PY_UINT64_T __pyx_dict_version;\1286PyObject *__pyx_dict_cached_value;\1287(var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\1288}1289static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);1290#else1291#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)1292#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)1293static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);1294#endif12951296/* PyObjectCall.proto */1297#if CYTHON_COMPILING_IN_CPYTHON1298static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);1299#else1300#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)1301#endif13021303/* ExtTypeTest.proto */1304static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);13051306/* GetItemInt.proto */1307#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\1308(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\1309__Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\1310(is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\1311__Pyx_GetItemInt_Generic(o, to_py_func(i))))1312#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\1313(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\1314__Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\1315(PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))1316static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,1317int wraparound, int boundscheck);1318#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\1319(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\1320__Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\1321(PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))1322static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,1323int wraparound, int boundscheck);1324static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);1325static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,1326int is_list, int wraparound, int boundscheck);13271328/* ObjectGetItem.proto */1329#if CYTHON_USE_TYPE_SLOTS1330static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);1331#else1332#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)1333#endif13341335/* PyFunctionFastCall.proto */1336#if CYTHON_FAST_PYCALL1337#define __Pyx_PyFunction_FastCall(func, args, nargs)\1338__Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)1339#if 1 || PY_VERSION_HEX < 0x030600B11340static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);1341#else1342#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)1343#endif1344#define __Pyx_BUILD_ASSERT_EXPR(cond)\1345(sizeof(char [1 - 2*!(cond)]) - 1)1346#ifndef Py_MEMBER_SIZE1347#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)1348#endif1349static size_t __pyx_pyframe_localsplus_offset = 0;1350#include "frameobject.h"1351#define __Pxy_PyFrame_Initialize_Offsets()\1352((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\1353(void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))1354#define __Pyx_PyFrame_GetLocalsplus(frame)\1355(assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))1356#endif13571358/* PyObjectCallMethO.proto */1359#if CYTHON_COMPILING_IN_CPYTHON1360static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);1361#endif13621363/* PyObjectCallNoArg.proto */1364#if CYTHON_COMPILING_IN_CPYTHON1365static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);1366#else1367#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)1368#endif13691370/* PyCFunctionFastCall.proto */1371#if CYTHON_FAST_PYCCALL1372static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);1373#else1374#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)1375#endif13761377/* PyObjectCallOneArg.proto */1378static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);13791380/* BufferIndexError.proto */1381static void __Pyx_RaiseBufferIndexError(int axis);13821383#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)1384#define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1)1385/* BufferFallbackError.proto */1386static void __Pyx_RaiseBufferFallbackError(void);13871388/* PyThreadStateGet.proto */1389#if CYTHON_FAST_THREAD_STATE1390#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;1391#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;1392#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type1393#else1394#define __Pyx_PyThreadState_declare1395#define __Pyx_PyThreadState_assign1396#define __Pyx_PyErr_Occurred() PyErr_Occurred()1397#endif13981399/* PyErrFetchRestore.proto */1400#if CYTHON_FAST_THREAD_STATE1401#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)1402#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)1403#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)1404#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)1405#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)1406static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);1407static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);1408#if CYTHON_COMPILING_IN_CPYTHON1409#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))1410#else1411#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)1412#endif1413#else1414#define __Pyx_PyErr_Clear() PyErr_Clear()1415#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)1416#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)1417#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)1418#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)1419#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)1420#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)1421#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)1422#endif14231424/* RaiseException.proto */1425static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);14261427/* DictGetItem.proto */1428#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY1429static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);1430#define __Pyx_PyObject_Dict_GetItem(obj, name)\1431(likely(PyDict_CheckExact(obj)) ?\1432__Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))1433#else1434#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)1435#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)1436#endif14371438/* RaiseTooManyValuesToUnpack.proto */1439static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);14401441/* RaiseNeedMoreValuesToUnpack.proto */1442static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);14431444/* RaiseNoneIterError.proto */1445static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);14461447/* GetTopmostException.proto */1448#if CYTHON_USE_EXC_INFO_STACK1449static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);1450#endif14511452/* SaveResetException.proto */1453#if CYTHON_FAST_THREAD_STATE1454#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)1455static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);1456#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)1457static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);1458#else1459#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)1460#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)1461#endif14621463/* PyErrExceptionMatches.proto */1464#if CYTHON_FAST_THREAD_STATE1465#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)1466static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);1467#else1468#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)1469#endif14701471/* GetException.proto */1472#if CYTHON_FAST_THREAD_STATE1473#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)1474static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);1475#else1476static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);1477#endif14781479/* TypeImport.proto */1480#ifndef __PYX_HAVE_RT_ImportType_proto1481#define __PYX_HAVE_RT_ImportType_proto1482enum __Pyx_ImportType_CheckSize {1483__Pyx_ImportType_CheckSize_Error = 0,1484__Pyx_ImportType_CheckSize_Warn = 1,1485__Pyx_ImportType_CheckSize_Ignore = 21486};1487static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);1488#endif14891490/* Import.proto */1491static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);14921493/* CLineInTraceback.proto */1494#ifdef CYTHON_CLINE_IN_TRACEBACK1495#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)1496#else1497static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);1498#endif14991500/* CodeObjectCache.proto */1501typedef struct {1502PyCodeObject* code_object;1503int code_line;1504} __Pyx_CodeObjectCacheEntry;1505struct __Pyx_CodeObjectCache {1506int count;1507int max_count;1508__Pyx_CodeObjectCacheEntry* entries;1509};1510static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};1511static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);1512static PyCodeObject *__pyx_find_code_object(int code_line);1513static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);15141515/* AddTraceback.proto */1516static void __Pyx_AddTraceback(const char *funcname, int c_line,1517int py_line, const char *filename);15181519/* BufferStructDeclare.proto */1520typedef struct {1521Py_ssize_t shape, strides, suboffsets;1522} __Pyx_Buf_DimInfo;1523typedef struct {1524size_t refcount;1525Py_buffer pybuffer;1526} __Pyx_Buffer;1527typedef struct {1528__Pyx_Buffer *rcbuffer;1529char *data;1530__Pyx_Buf_DimInfo diminfo[8];1531} __Pyx_LocalBuf_ND;15321533#if PY_MAJOR_VERSION < 31534static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);1535static void __Pyx_ReleaseBuffer(Py_buffer *view);1536#else1537#define __Pyx_GetBuffer PyObject_GetBuffer1538#define __Pyx_ReleaseBuffer PyBuffer_Release1539#endif154015411542/* CIntToPy.proto */1543static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);15441545/* RealImag.proto */1546#if CYTHON_CCOMPLEX1547#ifdef __cplusplus1548#define __Pyx_CREAL(z) ((z).real())1549#define __Pyx_CIMAG(z) ((z).imag())1550#else1551#define __Pyx_CREAL(z) (__real__(z))1552#define __Pyx_CIMAG(z) (__imag__(z))1553#endif1554#else1555#define __Pyx_CREAL(z) ((z).real)1556#define __Pyx_CIMAG(z) ((z).imag)1557#endif1558#if defined(__cplusplus) && CYTHON_CCOMPLEX\1559&& (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)1560#define __Pyx_SET_CREAL(z,x) ((z).real(x))1561#define __Pyx_SET_CIMAG(z,y) ((z).imag(y))1562#else1563#define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)1564#define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)1565#endif15661567/* Arithmetic.proto */1568#if CYTHON_CCOMPLEX1569#define __Pyx_c_eq_float(a, b) ((a)==(b))1570#define __Pyx_c_sum_float(a, b) ((a)+(b))1571#define __Pyx_c_diff_float(a, b) ((a)-(b))1572#define __Pyx_c_prod_float(a, b) ((a)*(b))1573#define __Pyx_c_quot_float(a, b) ((a)/(b))1574#define __Pyx_c_neg_float(a) (-(a))1575#ifdef __cplusplus1576#define __Pyx_c_is_zero_float(z) ((z)==(float)0)1577#define __Pyx_c_conj_float(z) (::std::conj(z))1578#if 11579#define __Pyx_c_abs_float(z) (::std::abs(z))1580#define __Pyx_c_pow_float(a, b) (::std::pow(a, b))1581#endif1582#else1583#define __Pyx_c_is_zero_float(z) ((z)==0)1584#define __Pyx_c_conj_float(z) (conjf(z))1585#if 11586#define __Pyx_c_abs_float(z) (cabsf(z))1587#define __Pyx_c_pow_float(a, b) (cpowf(a, b))1588#endif1589#endif1590#else1591static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);1592static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);1593static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);1594static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);1595static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);1596static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);1597static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);1598static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);1599#if 11600static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);1601static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);1602#endif1603#endif16041605/* Arithmetic.proto */1606#if CYTHON_CCOMPLEX1607#define __Pyx_c_eq_double(a, b) ((a)==(b))1608#define __Pyx_c_sum_double(a, b) ((a)+(b))1609#define __Pyx_c_diff_double(a, b) ((a)-(b))1610#define __Pyx_c_prod_double(a, b) ((a)*(b))1611#define __Pyx_c_quot_double(a, b) ((a)/(b))1612#define __Pyx_c_neg_double(a) (-(a))1613#ifdef __cplusplus1614#define __Pyx_c_is_zero_double(z) ((z)==(double)0)1615#define __Pyx_c_conj_double(z) (::std::conj(z))1616#if 11617#define __Pyx_c_abs_double(z) (::std::abs(z))1618#define __Pyx_c_pow_double(a, b) (::std::pow(a, b))1619#endif1620#else1621#define __Pyx_c_is_zero_double(z) ((z)==0)1622#define __Pyx_c_conj_double(z) (conj(z))1623#if 11624#define __Pyx_c_abs_double(z) (cabs(z))1625#define __Pyx_c_pow_double(a, b) (cpow(a, b))1626#endif1627#endif1628#else1629static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);1630static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);1631static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);1632static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);1633static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);1634static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);1635static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);1636static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);1637#if 11638static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);1639static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);1640#endif1641#endif16421643/* CIntToPy.proto */1644static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);16451646/* CIntFromPy.proto */1647static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *);16481649/* CIntFromPy.proto */1650static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);16511652/* CIntToPy.proto */1653static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);16541655/* CIntFromPy.proto */1656static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);16571658/* FastTypeChecks.proto */1659#if CYTHON_COMPILING_IN_CPYTHON1660#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)1661static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);1662static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);1663static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);1664#else1665#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)1666#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)1667#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))1668#endif1669#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)16701671/* CheckBinaryVersion.proto */1672static int __Pyx_check_binary_version(void);16731674/* InitStrings.proto */1675static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);167616771678/* Module declarations from 'cpython.buffer' */16791680/* Module declarations from 'libc.string' */16811682/* Module declarations from 'libc.stdio' */16831684/* Module declarations from '__builtin__' */16851686/* Module declarations from 'cpython.type' */1687static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;16881689/* Module declarations from 'cpython' */16901691/* Module declarations from 'cpython.object' */16921693/* Module declarations from 'cpython.ref' */16941695/* Module declarations from 'cpython.mem' */16961697/* Module declarations from 'numpy' */16981699/* Module declarations from 'numpy' */1700static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;1701static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;1702static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;1703static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;1704static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;1705static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/17061707/* Module declarations from 'poly_nms' */1708static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 };1709static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 };1710static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int_t = { "int_t", NULL, sizeof(__pyx_t_5numpy_int_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int_t), 0 };1711#define __Pyx_MODULE_NAME "poly_nms"1712extern int __pyx_module_is_main_poly_nms;1713int __pyx_module_is_main_poly_nms = 0;17141715/* Implementation of 'poly_nms' */1716static PyObject *__pyx_builtin_ValueError;1717static PyObject *__pyx_builtin_range;1718static PyObject *__pyx_builtin_RuntimeError;1719static PyObject *__pyx_builtin_ImportError;1720static const char __pyx_k_np[] = "np";1721static const char __pyx_k_dets[] = "dets";1722static const char __pyx_k_keep[] = "keep";1723static const char __pyx_k_main[] = "__main__";1724static const char __pyx_k_name[] = "__name__";1725static const char __pyx_k_test[] = "__test__";1726static const char __pyx_k_dtype[] = "dtype";1727static const char __pyx_k_int32[] = "int32";1728static const char __pyx_k_numpy[] = "numpy";1729static const char __pyx_k_order[] = "order";1730static const char __pyx_k_range[] = "range";1731static const char __pyx_k_zeros[] = "zeros";1732static const char __pyx_k_import[] = "__import__";1733static const char __pyx_k_scores[] = "scores";1734static const char __pyx_k_thresh[] = "thresh";1735static const char __pyx_k_argsort[] = "argsort";1736static const char __pyx_k_num_out[] = "num_out";1737static const char __pyx_k_poly_nms[] = "poly_nms";1738static const char __pyx_k_boxes_dim[] = "boxes_dim";1739static const char __pyx_k_boxes_num[] = "boxes_num";1740static const char __pyx_k_device_id[] = "device_id";1741static const char __pyx_k_ValueError[] = "ValueError";1742static const char __pyx_k_ImportError[] = "ImportError";1743static const char __pyx_k_sorted_dets[] = "sorted_dets";1744static const char __pyx_k_RuntimeError[] = "RuntimeError";1745static const char __pyx_k_poly_gpu_nms[] = "poly_gpu_nms";1746static const char __pyx_k_poly_nms_pyx[] = "poly_nms.pyx";1747static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";1748static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";1749static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";1750static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";1751static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";1752static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";1753static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";1754static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";1755static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";1756static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;1757static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;1758static PyObject *__pyx_n_s_ImportError;1759static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;1760static PyObject *__pyx_n_s_RuntimeError;1761static PyObject *__pyx_n_s_ValueError;1762static PyObject *__pyx_n_s_argsort;1763static PyObject *__pyx_n_s_boxes_dim;1764static PyObject *__pyx_n_s_boxes_num;1765static PyObject *__pyx_n_s_cline_in_traceback;1766static PyObject *__pyx_n_s_dets;1767static PyObject *__pyx_n_s_device_id;1768static PyObject *__pyx_n_s_dtype;1769static PyObject *__pyx_n_s_import;1770static PyObject *__pyx_n_s_int32;1771static PyObject *__pyx_n_s_keep;1772static PyObject *__pyx_n_s_main;1773static PyObject *__pyx_n_s_name;1774static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;1775static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;1776static PyObject *__pyx_n_s_np;1777static PyObject *__pyx_n_s_num_out;1778static PyObject *__pyx_n_s_numpy;1779static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;1780static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;1781static PyObject *__pyx_n_s_order;1782static PyObject *__pyx_n_s_poly_gpu_nms;1783static PyObject *__pyx_n_s_poly_nms;1784static PyObject *__pyx_kp_s_poly_nms_pyx;1785static PyObject *__pyx_n_s_range;1786static PyObject *__pyx_n_s_scores;1787static PyObject *__pyx_n_s_sorted_dets;1788static PyObject *__pyx_n_s_test;1789static PyObject *__pyx_n_s_thresh;1790static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;1791static PyObject *__pyx_n_s_zeros;1792static PyObject *__pyx_pf_8poly_nms_poly_gpu_nms(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dets, PyObject *__pyx_v_thresh, __pyx_t_5numpy_int32_t __pyx_v_device_id); /* proto */1793static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */1794static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */1795static PyObject *__pyx_int_8;1796static PyObject *__pyx_int_neg_1;1797static PyObject *__pyx_slice_;1798static PyObject *__pyx_slice__3;1799static PyObject *__pyx_tuple__2;1800static PyObject *__pyx_tuple__4;1801static PyObject *__pyx_tuple__5;1802static PyObject *__pyx_tuple__6;1803static PyObject *__pyx_tuple__7;1804static PyObject *__pyx_tuple__8;1805static PyObject *__pyx_tuple__9;1806static PyObject *__pyx_tuple__10;1807static PyObject *__pyx_tuple__11;1808static PyObject *__pyx_codeobj__12;1809/* Late includes */18101811/* "poly_nms.pyx":91812* void _poly_nms(np.int32_t*, int*, np.float32_t*, int, int, float, int)1813*1814* def poly_gpu_nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh, # <<<<<<<<<<<<<<1815* np.int32_t device_id=0):1816* cdef int boxes_num = dets.shape[0]1817*/18181819/* Python wrapper */1820static PyObject *__pyx_pw_8poly_nms_1poly_gpu_nms(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/1821static PyMethodDef __pyx_mdef_8poly_nms_1poly_gpu_nms = {"poly_gpu_nms", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8poly_nms_1poly_gpu_nms, METH_VARARGS|METH_KEYWORDS, 0};1822static PyObject *__pyx_pw_8poly_nms_1poly_gpu_nms(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {1823PyArrayObject *__pyx_v_dets = 0;1824PyObject *__pyx_v_thresh = 0;1825__pyx_t_5numpy_int32_t __pyx_v_device_id;1826PyObject *__pyx_r = 0;1827__Pyx_RefNannyDeclarations1828__Pyx_RefNannySetupContext("poly_gpu_nms (wrapper)", 0);1829{1830static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dets,&__pyx_n_s_thresh,&__pyx_n_s_device_id,0};1831PyObject* values[3] = {0,0,0};1832if (unlikely(__pyx_kwds)) {1833Py_ssize_t kw_args;1834const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);1835switch (pos_args) {1836case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);1837CYTHON_FALLTHROUGH;1838case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);1839CYTHON_FALLTHROUGH;1840case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);1841CYTHON_FALLTHROUGH;1842case 0: break;1843default: goto __pyx_L5_argtuple_error;1844}1845kw_args = PyDict_Size(__pyx_kwds);1846switch (pos_args) {1847case 0:1848if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dets)) != 0)) kw_args--;1849else goto __pyx_L5_argtuple_error;1850CYTHON_FALLTHROUGH;1851case 1:1852if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_thresh)) != 0)) kw_args--;1853else {1854__Pyx_RaiseArgtupleInvalid("poly_gpu_nms", 0, 2, 3, 1); __PYX_ERR(0, 9, __pyx_L3_error)1855}1856CYTHON_FALLTHROUGH;1857case 2:1858if (kw_args > 0) {1859PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_device_id);1860if (value) { values[2] = value; kw_args--; }1861}1862}1863if (unlikely(kw_args > 0)) {1864if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "poly_gpu_nms") < 0)) __PYX_ERR(0, 9, __pyx_L3_error)1865}1866} else {1867switch (PyTuple_GET_SIZE(__pyx_args)) {1868case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);1869CYTHON_FALLTHROUGH;1870case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);1871values[0] = PyTuple_GET_ITEM(__pyx_args, 0);1872break;1873default: goto __pyx_L5_argtuple_error;1874}1875}1876__pyx_v_dets = ((PyArrayObject *)values[0]);1877__pyx_v_thresh = ((PyObject*)values[1]);1878if (values[2]) {1879__pyx_v_device_id = __Pyx_PyInt_As_npy_int32(values[2]); if (unlikely((__pyx_v_device_id == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 10, __pyx_L3_error)1880} else {1881__pyx_v_device_id = ((__pyx_t_5numpy_int32_t)0);1882}1883}1884goto __pyx_L4_argument_unpacking_done;1885__pyx_L5_argtuple_error:;1886__Pyx_RaiseArgtupleInvalid("poly_gpu_nms", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9, __pyx_L3_error)1887__pyx_L3_error:;1888__Pyx_AddTraceback("poly_nms.poly_gpu_nms", __pyx_clineno, __pyx_lineno, __pyx_filename);1889__Pyx_RefNannyFinishContext();1890return NULL;1891__pyx_L4_argument_unpacking_done:;1892if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dets), __pyx_ptype_5numpy_ndarray, 1, "dets", 0))) __PYX_ERR(0, 9, __pyx_L1_error)1893if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_thresh), (&PyFloat_Type), 1, "thresh", 1))) __PYX_ERR(0, 9, __pyx_L1_error)1894__pyx_r = __pyx_pf_8poly_nms_poly_gpu_nms(__pyx_self, __pyx_v_dets, __pyx_v_thresh, __pyx_v_device_id);18951896/* function exit code */1897goto __pyx_L0;1898__pyx_L1_error:;1899__pyx_r = NULL;1900__pyx_L0:;1901__Pyx_RefNannyFinishContext();1902return __pyx_r;1903}19041905static PyObject *__pyx_pf_8poly_nms_poly_gpu_nms(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dets, PyObject *__pyx_v_thresh, __pyx_t_5numpy_int32_t __pyx_v_device_id) {1906int __pyx_v_boxes_num;1907int __pyx_v_boxes_dim;1908int __pyx_v_num_out;1909PyArrayObject *__pyx_v_keep = 0;1910PyArrayObject *__pyx_v_scores = 0;1911PyArrayObject *__pyx_v_order = 0;1912PyArrayObject *__pyx_v_sorted_dets = 0;1913__Pyx_LocalBuf_ND __pyx_pybuffernd_dets;1914__Pyx_Buffer __pyx_pybuffer_dets;1915__Pyx_LocalBuf_ND __pyx_pybuffernd_keep;1916__Pyx_Buffer __pyx_pybuffer_keep;1917__Pyx_LocalBuf_ND __pyx_pybuffernd_order;1918__Pyx_Buffer __pyx_pybuffer_order;1919__Pyx_LocalBuf_ND __pyx_pybuffernd_scores;1920__Pyx_Buffer __pyx_pybuffer_scores;1921__Pyx_LocalBuf_ND __pyx_pybuffernd_sorted_dets;1922__Pyx_Buffer __pyx_pybuffer_sorted_dets;1923PyObject *__pyx_r = NULL;1924__Pyx_RefNannyDeclarations1925PyObject *__pyx_t_1 = NULL;1926PyObject *__pyx_t_2 = NULL;1927PyObject *__pyx_t_3 = NULL;1928PyObject *__pyx_t_4 = NULL;1929PyObject *__pyx_t_5 = NULL;1930PyArrayObject *__pyx_t_6 = NULL;1931PyArrayObject *__pyx_t_7 = NULL;1932PyArrayObject *__pyx_t_8 = NULL;1933PyArrayObject *__pyx_t_9 = NULL;1934Py_ssize_t __pyx_t_10;1935int __pyx_t_11;1936Py_ssize_t __pyx_t_12;1937Py_ssize_t __pyx_t_13;1938float __pyx_t_14;1939PyObject *__pyx_t_15 = NULL;1940PyObject *__pyx_t_16 = NULL;1941PyObject *__pyx_t_17 = NULL;1942__Pyx_RefNannySetupContext("poly_gpu_nms", 0);1943__pyx_pybuffer_keep.pybuffer.buf = NULL;1944__pyx_pybuffer_keep.refcount = 0;1945__pyx_pybuffernd_keep.data = NULL;1946__pyx_pybuffernd_keep.rcbuffer = &__pyx_pybuffer_keep;1947__pyx_pybuffer_scores.pybuffer.buf = NULL;1948__pyx_pybuffer_scores.refcount = 0;1949__pyx_pybuffernd_scores.data = NULL;1950__pyx_pybuffernd_scores.rcbuffer = &__pyx_pybuffer_scores;1951__pyx_pybuffer_order.pybuffer.buf = NULL;1952__pyx_pybuffer_order.refcount = 0;1953__pyx_pybuffernd_order.data = NULL;1954__pyx_pybuffernd_order.rcbuffer = &__pyx_pybuffer_order;1955__pyx_pybuffer_sorted_dets.pybuffer.buf = NULL;1956__pyx_pybuffer_sorted_dets.refcount = 0;1957__pyx_pybuffernd_sorted_dets.data = NULL;1958__pyx_pybuffernd_sorted_dets.rcbuffer = &__pyx_pybuffer_sorted_dets;1959__pyx_pybuffer_dets.pybuffer.buf = NULL;1960__pyx_pybuffer_dets.refcount = 0;1961__pyx_pybuffernd_dets.data = NULL;1962__pyx_pybuffernd_dets.rcbuffer = &__pyx_pybuffer_dets;1963{1964__Pyx_BufFmt_StackElem __pyx_stack[1];1965if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dets.rcbuffer->pybuffer, (PyObject*)__pyx_v_dets, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 9, __pyx_L1_error)1966}1967__pyx_pybuffernd_dets.diminfo[0].strides = __pyx_pybuffernd_dets.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dets.diminfo[0].shape = __pyx_pybuffernd_dets.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_dets.diminfo[1].strides = __pyx_pybuffernd_dets.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_dets.diminfo[1].shape = __pyx_pybuffernd_dets.rcbuffer->pybuffer.shape[1];19681969/* "poly_nms.pyx":111970* def poly_gpu_nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh,1971* np.int32_t device_id=0):1972* cdef int boxes_num = dets.shape[0] # <<<<<<<<<<<<<<1973* cdef int boxes_dim = dets.shape[1]1974* cdef int num_out1975*/1976__pyx_v_boxes_num = (__pyx_v_dets->dimensions[0]);19771978/* "poly_nms.pyx":121979* np.int32_t device_id=0):1980* cdef int boxes_num = dets.shape[0]1981* cdef int boxes_dim = dets.shape[1] # <<<<<<<<<<<<<<1982* cdef int num_out1983* cdef np.ndarray[np.int32_t, ndim=1] \1984*/1985__pyx_v_boxes_dim = (__pyx_v_dets->dimensions[1]);19861987/* "poly_nms.pyx":151988* cdef int num_out1989* cdef np.ndarray[np.int32_t, ndim=1] \1990* keep = np.zeros(boxes_num, dtype=np.int32) # <<<<<<<<<<<<<<1991* cdef np.ndarray[np.float32_t, ndim=1] \1992* scores = dets[:, 8]1993*/1994__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)1995__Pyx_GOTREF(__pyx_t_1);1996__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)1997__Pyx_GOTREF(__pyx_t_2);1998__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;1999__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_boxes_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)2000__Pyx_GOTREF(__pyx_t_1);2001__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)2002__Pyx_GOTREF(__pyx_t_3);2003__Pyx_GIVEREF(__pyx_t_1);2004PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);2005__pyx_t_1 = 0;2006__pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)2007__Pyx_GOTREF(__pyx_t_1);2008__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error)2009__Pyx_GOTREF(__pyx_t_4);2010__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15, __pyx_L1_error)2011__Pyx_GOTREF(__pyx_t_5);2012__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;2013if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 15, __pyx_L1_error)2014__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;2015__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15, __pyx_L1_error)2016__Pyx_GOTREF(__pyx_t_5);2017__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;2018__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;2019__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;2020if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 15, __pyx_L1_error)2021__pyx_t_6 = ((PyArrayObject *)__pyx_t_5);2022{2023__Pyx_BufFmt_StackElem __pyx_stack[1];2024if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_keep.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {2025__pyx_v_keep = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_keep.rcbuffer->pybuffer.buf = NULL;2026__PYX_ERR(0, 14, __pyx_L1_error)2027} else {__pyx_pybuffernd_keep.diminfo[0].strides = __pyx_pybuffernd_keep.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_keep.diminfo[0].shape = __pyx_pybuffernd_keep.rcbuffer->pybuffer.shape[0];2028}2029}2030__pyx_t_6 = 0;2031__pyx_v_keep = ((PyArrayObject *)__pyx_t_5);2032__pyx_t_5 = 0;20332034/* "poly_nms.pyx":172035* keep = np.zeros(boxes_num, dtype=np.int32)2036* cdef np.ndarray[np.float32_t, ndim=1] \2037* scores = dets[:, 8] # <<<<<<<<<<<<<<2038* cdef np.ndarray[np.int_t, ndim=1] \2039* order = scores.argsort()[::-1]2040*/2041__pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17, __pyx_L1_error)2042__Pyx_GOTREF(__pyx_t_5);2043if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 17, __pyx_L1_error)2044__pyx_t_7 = ((PyArrayObject *)__pyx_t_5);2045{2046__Pyx_BufFmt_StackElem __pyx_stack[1];2047if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_scores.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {2048__pyx_v_scores = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_scores.rcbuffer->pybuffer.buf = NULL;2049__PYX_ERR(0, 16, __pyx_L1_error)2050} else {__pyx_pybuffernd_scores.diminfo[0].strides = __pyx_pybuffernd_scores.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_scores.diminfo[0].shape = __pyx_pybuffernd_scores.rcbuffer->pybuffer.shape[0];2051}2052}2053__pyx_t_7 = 0;2054__pyx_v_scores = ((PyArrayObject *)__pyx_t_5);2055__pyx_t_5 = 0;20562057/* "poly_nms.pyx":192058* scores = dets[:, 8]2059* cdef np.ndarray[np.int_t, ndim=1] \2060* order = scores.argsort()[::-1] # <<<<<<<<<<<<<<2061* cdef np.ndarray[np.float32_t, ndim=2] \2062* sorted_dets = dets[order, :]2063*/2064__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_scores), __pyx_n_s_argsort); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)2065__Pyx_GOTREF(__pyx_t_1);2066__pyx_t_3 = NULL;2067if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {2068__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);2069if (likely(__pyx_t_3)) {2070PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);2071__Pyx_INCREF(__pyx_t_3);2072__Pyx_INCREF(function);2073__Pyx_DECREF_SET(__pyx_t_1, function);2074}2075}2076__pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);2077__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;2078if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19, __pyx_L1_error)2079__Pyx_GOTREF(__pyx_t_5);2080__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;2081__pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_slice__3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)2082__Pyx_GOTREF(__pyx_t_1);2083__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;2084if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 19, __pyx_L1_error)2085__pyx_t_8 = ((PyArrayObject *)__pyx_t_1);2086{2087__Pyx_BufFmt_StackElem __pyx_stack[1];2088if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_order.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {2089__pyx_v_order = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_order.rcbuffer->pybuffer.buf = NULL;2090__PYX_ERR(0, 18, __pyx_L1_error)2091} else {__pyx_pybuffernd_order.diminfo[0].strides = __pyx_pybuffernd_order.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_order.diminfo[0].shape = __pyx_pybuffernd_order.rcbuffer->pybuffer.shape[0];2092}2093}2094__pyx_t_8 = 0;2095__pyx_v_order = ((PyArrayObject *)__pyx_t_1);2096__pyx_t_1 = 0;20972098/* "poly_nms.pyx":212099* order = scores.argsort()[::-1]2100* cdef np.ndarray[np.float32_t, ndim=2] \2101* sorted_dets = dets[order, :] # <<<<<<<<<<<<<<2102* _poly_nms(&keep[0], &num_out, &sorted_dets[0, 0], boxes_num, boxes_dim, thresh, device_id)2103* keep = keep[:num_out]2104*/2105__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)2106__Pyx_GOTREF(__pyx_t_1);2107__Pyx_INCREF(((PyObject *)__pyx_v_order));2108__Pyx_GIVEREF(((PyObject *)__pyx_v_order));2109PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_order));2110__Pyx_INCREF(__pyx_slice_);2111__Pyx_GIVEREF(__pyx_slice_);2112PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_slice_);2113__pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21, __pyx_L1_error)2114__Pyx_GOTREF(__pyx_t_5);2115__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;2116if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 21, __pyx_L1_error)2117__pyx_t_9 = ((PyArrayObject *)__pyx_t_5);2118{2119__Pyx_BufFmt_StackElem __pyx_stack[1];2120if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_dets.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {2121__pyx_v_sorted_dets = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_sorted_dets.rcbuffer->pybuffer.buf = NULL;2122__PYX_ERR(0, 20, __pyx_L1_error)2123} else {__pyx_pybuffernd_sorted_dets.diminfo[0].strides = __pyx_pybuffernd_sorted_dets.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sorted_dets.diminfo[0].shape = __pyx_pybuffernd_sorted_dets.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sorted_dets.diminfo[1].strides = __pyx_pybuffernd_sorted_dets.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sorted_dets.diminfo[1].shape = __pyx_pybuffernd_sorted_dets.rcbuffer->pybuffer.shape[1];2124}2125}2126__pyx_t_9 = 0;2127__pyx_v_sorted_dets = ((PyArrayObject *)__pyx_t_5);2128__pyx_t_5 = 0;21292130/* "poly_nms.pyx":222131* cdef np.ndarray[np.float32_t, ndim=2] \2132* sorted_dets = dets[order, :]2133* _poly_nms(&keep[0], &num_out, &sorted_dets[0, 0], boxes_num, boxes_dim, thresh, device_id) # <<<<<<<<<<<<<<2134* keep = keep[:num_out]2135* return list(order[keep])2136*/2137__pyx_t_10 = 0;2138__pyx_t_11 = -1;2139if (__pyx_t_10 < 0) {2140__pyx_t_10 += __pyx_pybuffernd_keep.diminfo[0].shape;2141if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;2142} else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_keep.diminfo[0].shape)) __pyx_t_11 = 0;2143if (unlikely(__pyx_t_11 != -1)) {2144__Pyx_RaiseBufferIndexError(__pyx_t_11);2145__PYX_ERR(0, 22, __pyx_L1_error)2146}2147__pyx_t_12 = 0;2148__pyx_t_13 = 0;2149__pyx_t_11 = -1;2150if (__pyx_t_12 < 0) {2151__pyx_t_12 += __pyx_pybuffernd_sorted_dets.diminfo[0].shape;2152if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0;2153} else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_sorted_dets.diminfo[0].shape)) __pyx_t_11 = 0;2154if (__pyx_t_13 < 0) {2155__pyx_t_13 += __pyx_pybuffernd_sorted_dets.diminfo[1].shape;2156if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 1;2157} else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_sorted_dets.diminfo[1].shape)) __pyx_t_11 = 1;2158if (unlikely(__pyx_t_11 != -1)) {2159__Pyx_RaiseBufferIndexError(__pyx_t_11);2160__PYX_ERR(0, 22, __pyx_L1_error)2161}2162__pyx_t_14 = __pyx_PyFloat_AsFloat(__pyx_v_thresh); if (unlikely((__pyx_t_14 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 22, __pyx_L1_error)2163_poly_nms((&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_keep.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_keep.diminfo[0].strides))), (&__pyx_v_num_out), (&(*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_sorted_dets.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_sorted_dets.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_sorted_dets.diminfo[1].strides))), __pyx_v_boxes_num, __pyx_v_boxes_dim, __pyx_t_14, __pyx_v_device_id);21642165/* "poly_nms.pyx":232166* sorted_dets = dets[order, :]2167* _poly_nms(&keep[0], &num_out, &sorted_dets[0, 0], boxes_num, boxes_dim, thresh, device_id)2168* keep = keep[:num_out] # <<<<<<<<<<<<<<2169* return list(order[keep])2170*/2171__pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_num_out); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23, __pyx_L1_error)2172__Pyx_GOTREF(__pyx_t_5);2173__pyx_t_1 = PySlice_New(Py_None, __pyx_t_5, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)2174__Pyx_GOTREF(__pyx_t_1);2175__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;2176__pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_keep), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23, __pyx_L1_error)2177__Pyx_GOTREF(__pyx_t_5);2178__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;2179if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 23, __pyx_L1_error)2180__pyx_t_6 = ((PyArrayObject *)__pyx_t_5);2181{2182__Pyx_BufFmt_StackElem __pyx_stack[1];2183__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_keep.rcbuffer->pybuffer);2184__pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_keep.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);2185if (unlikely(__pyx_t_11 < 0)) {2186PyErr_Fetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);2187if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_keep.rcbuffer->pybuffer, (PyObject*)__pyx_v_keep, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {2188Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17);2189__Pyx_RaiseBufferFallbackError();2190} else {2191PyErr_Restore(__pyx_t_15, __pyx_t_16, __pyx_t_17);2192}2193__pyx_t_15 = __pyx_t_16 = __pyx_t_17 = 0;2194}2195__pyx_pybuffernd_keep.diminfo[0].strides = __pyx_pybuffernd_keep.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_keep.diminfo[0].shape = __pyx_pybuffernd_keep.rcbuffer->pybuffer.shape[0];2196if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 23, __pyx_L1_error)2197}2198__pyx_t_6 = 0;2199__Pyx_DECREF_SET(__pyx_v_keep, ((PyArrayObject *)__pyx_t_5));2200__pyx_t_5 = 0;22012202/* "poly_nms.pyx":242203* _poly_nms(&keep[0], &num_out, &sorted_dets[0, 0], boxes_num, boxes_dim, thresh, device_id)2204* keep = keep[:num_out]2205* return list(order[keep]) # <<<<<<<<<<<<<<2206*/2207__Pyx_XDECREF(__pyx_r);2208__pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_order), ((PyObject *)__pyx_v_keep)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24, __pyx_L1_error)2209__Pyx_GOTREF(__pyx_t_5);2210__pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)2211__Pyx_GOTREF(__pyx_t_1);2212__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;2213__pyx_r = __pyx_t_1;2214__pyx_t_1 = 0;2215goto __pyx_L0;22162217/* "poly_nms.pyx":92218* void _poly_nms(np.int32_t*, int*, np.float32_t*, int, int, float, int)2219*2220* def poly_gpu_nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh, # <<<<<<<<<<<<<<2221* np.int32_t device_id=0):2222* cdef int boxes_num = dets.shape[0]2223*/22242225/* function exit code */2226__pyx_L1_error:;2227__Pyx_XDECREF(__pyx_t_1);2228__Pyx_XDECREF(__pyx_t_2);2229__Pyx_XDECREF(__pyx_t_3);2230__Pyx_XDECREF(__pyx_t_4);2231__Pyx_XDECREF(__pyx_t_5);2232{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;2233__Pyx_PyThreadState_declare2234__Pyx_PyThreadState_assign2235__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);2236__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dets.rcbuffer->pybuffer);2237__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_keep.rcbuffer->pybuffer);2238__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_order.rcbuffer->pybuffer);2239__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_scores.rcbuffer->pybuffer);2240__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_dets.rcbuffer->pybuffer);2241__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}2242__Pyx_AddTraceback("poly_nms.poly_gpu_nms", __pyx_clineno, __pyx_lineno, __pyx_filename);2243__pyx_r = NULL;2244goto __pyx_L2;2245__pyx_L0:;2246__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dets.rcbuffer->pybuffer);2247__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_keep.rcbuffer->pybuffer);2248__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_order.rcbuffer->pybuffer);2249__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_scores.rcbuffer->pybuffer);2250__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_dets.rcbuffer->pybuffer);2251__pyx_L2:;2252__Pyx_XDECREF((PyObject *)__pyx_v_keep);2253__Pyx_XDECREF((PyObject *)__pyx_v_scores);2254__Pyx_XDECREF((PyObject *)__pyx_v_order);2255__Pyx_XDECREF((PyObject *)__pyx_v_sorted_dets);2256__Pyx_XGIVEREF(__pyx_r);2257__Pyx_RefNannyFinishContext();2258return __pyx_r;2259}22602261/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2582262* # experimental exception made for __getbuffer__ and __releasebuffer__2263* # -- the details of this may change.2264* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<2265* # This implementation of getbuffer is geared towards Cython2266* # requirements, and does not yet fulfill the PEP.2267*/22682269/* Python wrapper */2270static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/2271static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {2272int __pyx_r;2273__Pyx_RefNannyDeclarations2274__Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);2275__pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));22762277/* function exit code */2278__Pyx_RefNannyFinishContext();2279return __pyx_r;2280}22812282static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {2283int __pyx_v_i;2284int __pyx_v_ndim;2285int __pyx_v_endian_detector;2286int __pyx_v_little_endian;2287int __pyx_v_t;2288char *__pyx_v_f;2289PyArray_Descr *__pyx_v_descr = 0;2290int __pyx_v_offset;2291int __pyx_r;2292__Pyx_RefNannyDeclarations2293int __pyx_t_1;2294int __pyx_t_2;2295PyObject *__pyx_t_3 = NULL;2296int __pyx_t_4;2297int __pyx_t_5;2298int __pyx_t_6;2299PyArray_Descr *__pyx_t_7;2300PyObject *__pyx_t_8 = NULL;2301char *__pyx_t_9;2302if (__pyx_v_info == NULL) {2303PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");2304return -1;2305}2306__Pyx_RefNannySetupContext("__getbuffer__", 0);2307__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);2308__Pyx_GIVEREF(__pyx_v_info->obj);23092310/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2652311*2312* cdef int i, ndim2313* cdef int endian_detector = 1 # <<<<<<<<<<<<<<2314* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)2315*2316*/2317__pyx_v_endian_detector = 1;23182319/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2662320* cdef int i, ndim2321* cdef int endian_detector = 12322* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<2323*2324* ndim = PyArray_NDIM(self)2325*/2326__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);23272328/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2682329* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)2330*2331* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<2332*2333* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)2334*/2335__pyx_v_ndim = PyArray_NDIM(__pyx_v_self);23362337/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2702338* ndim = PyArray_NDIM(self)2339*2340* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<2341* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):2342* raise ValueError(u"ndarray is not C contiguous")2343*/2344__pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);2345if (__pyx_t_2) {2346} else {2347__pyx_t_1 = __pyx_t_2;2348goto __pyx_L4_bool_binop_done;2349}23502351/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2712352*2353* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)2354* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<2355* raise ValueError(u"ndarray is not C contiguous")2356*2357*/2358__pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);2359__pyx_t_1 = __pyx_t_2;2360__pyx_L4_bool_binop_done:;23612362/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2702363* ndim = PyArray_NDIM(self)2364*2365* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<2366* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):2367* raise ValueError(u"ndarray is not C contiguous")2368*/2369if (unlikely(__pyx_t_1)) {23702371/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2722372* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)2373* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):2374* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<2375*2376* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)2377*/2378__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 272, __pyx_L1_error)2379__Pyx_GOTREF(__pyx_t_3);2380__Pyx_Raise(__pyx_t_3, 0, 0, 0);2381__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;2382__PYX_ERR(1, 272, __pyx_L1_error)23832384/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2702385* ndim = PyArray_NDIM(self)2386*2387* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<2388* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):2389* raise ValueError(u"ndarray is not C contiguous")2390*/2391}23922393/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2742394* raise ValueError(u"ndarray is not C contiguous")2395*2396* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<2397* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):2398* raise ValueError(u"ndarray is not Fortran contiguous")2399*/2400__pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);2401if (__pyx_t_2) {2402} else {2403__pyx_t_1 = __pyx_t_2;2404goto __pyx_L7_bool_binop_done;2405}24062407/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2752408*2409* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)2410* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<2411* raise ValueError(u"ndarray is not Fortran contiguous")2412*2413*/2414__pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);2415__pyx_t_1 = __pyx_t_2;2416__pyx_L7_bool_binop_done:;24172418/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2742419* raise ValueError(u"ndarray is not C contiguous")2420*2421* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<2422* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):2423* raise ValueError(u"ndarray is not Fortran contiguous")2424*/2425if (unlikely(__pyx_t_1)) {24262427/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2762428* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)2429* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):2430* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<2431*2432* info.buf = PyArray_DATA(self)2433*/2434__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 276, __pyx_L1_error)2435__Pyx_GOTREF(__pyx_t_3);2436__Pyx_Raise(__pyx_t_3, 0, 0, 0);2437__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;2438__PYX_ERR(1, 276, __pyx_L1_error)24392440/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2742441* raise ValueError(u"ndarray is not C contiguous")2442*2443* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<2444* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):2445* raise ValueError(u"ndarray is not Fortran contiguous")2446*/2447}24482449/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2782450* raise ValueError(u"ndarray is not Fortran contiguous")2451*2452* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<2453* info.ndim = ndim2454* if sizeof(npy_intp) != sizeof(Py_ssize_t):2455*/2456__pyx_v_info->buf = PyArray_DATA(__pyx_v_self);24572458/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2792459*2460* info.buf = PyArray_DATA(self)2461* info.ndim = ndim # <<<<<<<<<<<<<<2462* if sizeof(npy_intp) != sizeof(Py_ssize_t):2463* # Allocate new buffer for strides and shape info.2464*/2465__pyx_v_info->ndim = __pyx_v_ndim;24662467/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2802468* info.buf = PyArray_DATA(self)2469* info.ndim = ndim2470* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<2471* # Allocate new buffer for strides and shape info.2472* # This is allocated as one block, strides first.2473*/2474__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);2475if (__pyx_t_1) {24762477/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2832478* # Allocate new buffer for strides and shape info.2479* # This is allocated as one block, strides first.2480* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<2481* info.shape = info.strides + ndim2482* for i in range(ndim):2483*/2484__pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));24852486/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2842487* # This is allocated as one block, strides first.2488* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)2489* info.shape = info.strides + ndim # <<<<<<<<<<<<<<2490* for i in range(ndim):2491* info.strides[i] = PyArray_STRIDES(self)[i]2492*/2493__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);24942495/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2852496* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)2497* info.shape = info.strides + ndim2498* for i in range(ndim): # <<<<<<<<<<<<<<2499* info.strides[i] = PyArray_STRIDES(self)[i]2500* info.shape[i] = PyArray_DIMS(self)[i]2501*/2502__pyx_t_4 = __pyx_v_ndim;2503__pyx_t_5 = __pyx_t_4;2504for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {2505__pyx_v_i = __pyx_t_6;25062507/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2862508* info.shape = info.strides + ndim2509* for i in range(ndim):2510* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<2511* info.shape[i] = PyArray_DIMS(self)[i]2512* else:2513*/2514(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);25152516/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2872517* for i in range(ndim):2518* info.strides[i] = PyArray_STRIDES(self)[i]2519* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<2520* else:2521* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)2522*/2523(__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);2524}25252526/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2802527* info.buf = PyArray_DATA(self)2528* info.ndim = ndim2529* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<2530* # Allocate new buffer for strides and shape info.2531* # This is allocated as one block, strides first.2532*/2533goto __pyx_L9;2534}25352536/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2892537* info.shape[i] = PyArray_DIMS(self)[i]2538* else:2539* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<2540* info.shape = <Py_ssize_t*>PyArray_DIMS(self)2541* info.suboffsets = NULL2542*/2543/*else*/ {2544__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));25452546/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2902547* else:2548* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)2549* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<2550* info.suboffsets = NULL2551* info.itemsize = PyArray_ITEMSIZE(self)2552*/2553__pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));2554}2555__pyx_L9:;25562557/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2912558* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)2559* info.shape = <Py_ssize_t*>PyArray_DIMS(self)2560* info.suboffsets = NULL # <<<<<<<<<<<<<<2561* info.itemsize = PyArray_ITEMSIZE(self)2562* info.readonly = not PyArray_ISWRITEABLE(self)2563*/2564__pyx_v_info->suboffsets = NULL;25652566/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2922567* info.shape = <Py_ssize_t*>PyArray_DIMS(self)2568* info.suboffsets = NULL2569* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<2570* info.readonly = not PyArray_ISWRITEABLE(self)2571*2572*/2573__pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);25742575/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2932576* info.suboffsets = NULL2577* info.itemsize = PyArray_ITEMSIZE(self)2578* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<2579*2580* cdef int t2581*/2582__pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));25832584/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2962585*2586* cdef int t2587* cdef char* f = NULL # <<<<<<<<<<<<<<2588* cdef dtype descr = <dtype>PyArray_DESCR(self)2589* cdef int offset2590*/2591__pyx_v_f = NULL;25922593/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2972594* cdef int t2595* cdef char* f = NULL2596* cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<2597* cdef int offset2598*2599*/2600__pyx_t_7 = PyArray_DESCR(__pyx_v_self);2601__pyx_t_3 = ((PyObject *)__pyx_t_7);2602__Pyx_INCREF(__pyx_t_3);2603__pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);2604__pyx_t_3 = 0;26052606/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3002607* cdef int offset2608*2609* info.obj = self # <<<<<<<<<<<<<<2610*2611* if not PyDataType_HASFIELDS(descr):2612*/2613__Pyx_INCREF(((PyObject *)__pyx_v_self));2614__Pyx_GIVEREF(((PyObject *)__pyx_v_self));2615__Pyx_GOTREF(__pyx_v_info->obj);2616__Pyx_DECREF(__pyx_v_info->obj);2617__pyx_v_info->obj = ((PyObject *)__pyx_v_self);26182619/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3022620* info.obj = self2621*2622* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<2623* t = descr.type_num2624* if ((descr.byteorder == c'>' and little_endian) or2625*/2626__pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);2627if (__pyx_t_1) {26282629/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3032630*2631* if not PyDataType_HASFIELDS(descr):2632* t = descr.type_num # <<<<<<<<<<<<<<2633* if ((descr.byteorder == c'>' and little_endian) or2634* (descr.byteorder == c'<' and not little_endian)):2635*/2636__pyx_t_4 = __pyx_v_descr->type_num;2637__pyx_v_t = __pyx_t_4;26382639/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3042640* if not PyDataType_HASFIELDS(descr):2641* t = descr.type_num2642* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<2643* (descr.byteorder == c'<' and not little_endian)):2644* raise ValueError(u"Non-native byte order not supported")2645*/2646__pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);2647if (!__pyx_t_2) {2648goto __pyx_L15_next_or;2649} else {2650}2651__pyx_t_2 = (__pyx_v_little_endian != 0);2652if (!__pyx_t_2) {2653} else {2654__pyx_t_1 = __pyx_t_2;2655goto __pyx_L14_bool_binop_done;2656}2657__pyx_L15_next_or:;26582659/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3052660* t = descr.type_num2661* if ((descr.byteorder == c'>' and little_endian) or2662* (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<2663* raise ValueError(u"Non-native byte order not supported")2664* if t == NPY_BYTE: f = "b"2665*/2666__pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);2667if (__pyx_t_2) {2668} else {2669__pyx_t_1 = __pyx_t_2;2670goto __pyx_L14_bool_binop_done;2671}2672__pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);2673__pyx_t_1 = __pyx_t_2;2674__pyx_L14_bool_binop_done:;26752676/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3042677* if not PyDataType_HASFIELDS(descr):2678* t = descr.type_num2679* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<2680* (descr.byteorder == c'<' and not little_endian)):2681* raise ValueError(u"Non-native byte order not supported")2682*/2683if (unlikely(__pyx_t_1)) {26842685/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3062686* if ((descr.byteorder == c'>' and little_endian) or2687* (descr.byteorder == c'<' and not little_endian)):2688* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<2689* if t == NPY_BYTE: f = "b"2690* elif t == NPY_UBYTE: f = "B"2691*/2692__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 306, __pyx_L1_error)2693__Pyx_GOTREF(__pyx_t_3);2694__Pyx_Raise(__pyx_t_3, 0, 0, 0);2695__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;2696__PYX_ERR(1, 306, __pyx_L1_error)26972698/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3042699* if not PyDataType_HASFIELDS(descr):2700* t = descr.type_num2701* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<2702* (descr.byteorder == c'<' and not little_endian)):2703* raise ValueError(u"Non-native byte order not supported")2704*/2705}27062707/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3072708* (descr.byteorder == c'<' and not little_endian)):2709* raise ValueError(u"Non-native byte order not supported")2710* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<2711* elif t == NPY_UBYTE: f = "B"2712* elif t == NPY_SHORT: f = "h"2713*/2714switch (__pyx_v_t) {2715case NPY_BYTE:2716__pyx_v_f = ((char *)"b");2717break;2718case NPY_UBYTE:27192720/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3082721* raise ValueError(u"Non-native byte order not supported")2722* if t == NPY_BYTE: f = "b"2723* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<2724* elif t == NPY_SHORT: f = "h"2725* elif t == NPY_USHORT: f = "H"2726*/2727__pyx_v_f = ((char *)"B");2728break;2729case NPY_SHORT:27302731/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3092732* if t == NPY_BYTE: f = "b"2733* elif t == NPY_UBYTE: f = "B"2734* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<2735* elif t == NPY_USHORT: f = "H"2736* elif t == NPY_INT: f = "i"2737*/2738__pyx_v_f = ((char *)"h");2739break;2740case NPY_USHORT:27412742/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3102743* elif t == NPY_UBYTE: f = "B"2744* elif t == NPY_SHORT: f = "h"2745* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<2746* elif t == NPY_INT: f = "i"2747* elif t == NPY_UINT: f = "I"2748*/2749__pyx_v_f = ((char *)"H");2750break;2751case NPY_INT:27522753/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3112754* elif t == NPY_SHORT: f = "h"2755* elif t == NPY_USHORT: f = "H"2756* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<2757* elif t == NPY_UINT: f = "I"2758* elif t == NPY_LONG: f = "l"2759*/2760__pyx_v_f = ((char *)"i");2761break;2762case NPY_UINT:27632764/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3122765* elif t == NPY_USHORT: f = "H"2766* elif t == NPY_INT: f = "i"2767* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<2768* elif t == NPY_LONG: f = "l"2769* elif t == NPY_ULONG: f = "L"2770*/2771__pyx_v_f = ((char *)"I");2772break;2773case NPY_LONG:27742775/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3132776* elif t == NPY_INT: f = "i"2777* elif t == NPY_UINT: f = "I"2778* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<2779* elif t == NPY_ULONG: f = "L"2780* elif t == NPY_LONGLONG: f = "q"2781*/2782__pyx_v_f = ((char *)"l");2783break;2784case NPY_ULONG:27852786/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3142787* elif t == NPY_UINT: f = "I"2788* elif t == NPY_LONG: f = "l"2789* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<2790* elif t == NPY_LONGLONG: f = "q"2791* elif t == NPY_ULONGLONG: f = "Q"2792*/2793__pyx_v_f = ((char *)"L");2794break;2795case NPY_LONGLONG:27962797/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3152798* elif t == NPY_LONG: f = "l"2799* elif t == NPY_ULONG: f = "L"2800* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<2801* elif t == NPY_ULONGLONG: f = "Q"2802* elif t == NPY_FLOAT: f = "f"2803*/2804__pyx_v_f = ((char *)"q");2805break;2806case NPY_ULONGLONG:28072808/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3162809* elif t == NPY_ULONG: f = "L"2810* elif t == NPY_LONGLONG: f = "q"2811* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<2812* elif t == NPY_FLOAT: f = "f"2813* elif t == NPY_DOUBLE: f = "d"2814*/2815__pyx_v_f = ((char *)"Q");2816break;2817case NPY_FLOAT:28182819/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3172820* elif t == NPY_LONGLONG: f = "q"2821* elif t == NPY_ULONGLONG: f = "Q"2822* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<2823* elif t == NPY_DOUBLE: f = "d"2824* elif t == NPY_LONGDOUBLE: f = "g"2825*/2826__pyx_v_f = ((char *)"f");2827break;2828case NPY_DOUBLE:28292830/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3182831* elif t == NPY_ULONGLONG: f = "Q"2832* elif t == NPY_FLOAT: f = "f"2833* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<2834* elif t == NPY_LONGDOUBLE: f = "g"2835* elif t == NPY_CFLOAT: f = "Zf"2836*/2837__pyx_v_f = ((char *)"d");2838break;2839case NPY_LONGDOUBLE:28402841/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3192842* elif t == NPY_FLOAT: f = "f"2843* elif t == NPY_DOUBLE: f = "d"2844* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<2845* elif t == NPY_CFLOAT: f = "Zf"2846* elif t == NPY_CDOUBLE: f = "Zd"2847*/2848__pyx_v_f = ((char *)"g");2849break;2850case NPY_CFLOAT:28512852/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3202853* elif t == NPY_DOUBLE: f = "d"2854* elif t == NPY_LONGDOUBLE: f = "g"2855* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<2856* elif t == NPY_CDOUBLE: f = "Zd"2857* elif t == NPY_CLONGDOUBLE: f = "Zg"2858*/2859__pyx_v_f = ((char *)"Zf");2860break;2861case NPY_CDOUBLE:28622863/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3212864* elif t == NPY_LONGDOUBLE: f = "g"2865* elif t == NPY_CFLOAT: f = "Zf"2866* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<2867* elif t == NPY_CLONGDOUBLE: f = "Zg"2868* elif t == NPY_OBJECT: f = "O"2869*/2870__pyx_v_f = ((char *)"Zd");2871break;2872case NPY_CLONGDOUBLE:28732874/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3222875* elif t == NPY_CFLOAT: f = "Zf"2876* elif t == NPY_CDOUBLE: f = "Zd"2877* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<2878* elif t == NPY_OBJECT: f = "O"2879* else:2880*/2881__pyx_v_f = ((char *)"Zg");2882break;2883case NPY_OBJECT:28842885/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3232886* elif t == NPY_CDOUBLE: f = "Zd"2887* elif t == NPY_CLONGDOUBLE: f = "Zg"2888* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<2889* else:2890* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)2891*/2892__pyx_v_f = ((char *)"O");2893break;2894default:28952896/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3252897* elif t == NPY_OBJECT: f = "O"2898* else:2899* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<2900* info.format = f2901* return2902*/2903__pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 325, __pyx_L1_error)2904__Pyx_GOTREF(__pyx_t_3);2905__pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 325, __pyx_L1_error)2906__Pyx_GOTREF(__pyx_t_8);2907__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;2908__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 325, __pyx_L1_error)2909__Pyx_GOTREF(__pyx_t_3);2910__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;2911__Pyx_Raise(__pyx_t_3, 0, 0, 0);2912__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;2913__PYX_ERR(1, 325, __pyx_L1_error)2914break;2915}29162917/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3262918* else:2919* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)2920* info.format = f # <<<<<<<<<<<<<<2921* return2922* else:2923*/2924__pyx_v_info->format = __pyx_v_f;29252926/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3272927* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)2928* info.format = f2929* return # <<<<<<<<<<<<<<2930* else:2931* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)2932*/2933__pyx_r = 0;2934goto __pyx_L0;29352936/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3022937* info.obj = self2938*2939* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<2940* t = descr.type_num2941* if ((descr.byteorder == c'>' and little_endian) or2942*/2943}29442945/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3292946* return2947* else:2948* info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<2949* info.format[0] = c'^' # Native data types, manual alignment2950* offset = 02951*/2952/*else*/ {2953__pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));29542955/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3302956* else:2957* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)2958* info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<2959* offset = 02960* f = _util_dtypestring(descr, info.format + 1,2961*/2962(__pyx_v_info->format[0]) = '^';29632964/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3312965* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)2966* info.format[0] = c'^' # Native data types, manual alignment2967* offset = 0 # <<<<<<<<<<<<<<2968* f = _util_dtypestring(descr, info.format + 1,2969* info.format + _buffer_format_string_len,2970*/2971__pyx_v_offset = 0;29722973/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3322974* info.format[0] = c'^' # Native data types, manual alignment2975* offset = 02976* f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<2977* info.format + _buffer_format_string_len,2978* &offset)2979*/2980__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 332, __pyx_L1_error)2981__pyx_v_f = __pyx_t_9;29822983/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3352984* info.format + _buffer_format_string_len,2985* &offset)2986* f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<2987*2988* def __releasebuffer__(ndarray self, Py_buffer* info):2989*/2990(__pyx_v_f[0]) = '\x00';2991}29922993/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2582994* # experimental exception made for __getbuffer__ and __releasebuffer__2995* # -- the details of this may change.2996* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<2997* # This implementation of getbuffer is geared towards Cython2998* # requirements, and does not yet fulfill the PEP.2999*/30003001/* function exit code */3002__pyx_r = 0;3003goto __pyx_L0;3004__pyx_L1_error:;3005__Pyx_XDECREF(__pyx_t_3);3006__Pyx_XDECREF(__pyx_t_8);3007__Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);3008__pyx_r = -1;3009if (__pyx_v_info->obj != NULL) {3010__Pyx_GOTREF(__pyx_v_info->obj);3011__Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;3012}3013goto __pyx_L2;3014__pyx_L0:;3015if (__pyx_v_info->obj == Py_None) {3016__Pyx_GOTREF(__pyx_v_info->obj);3017__Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;3018}3019__pyx_L2:;3020__Pyx_XDECREF((PyObject *)__pyx_v_descr);3021__Pyx_RefNannyFinishContext();3022return __pyx_r;3023}30243025/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3373026* f[0] = c'\0' # Terminate format string3027*3028* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<3029* if PyArray_HASFIELDS(self):3030* PyObject_Free(info.format)3031*/30323033/* Python wrapper */3034static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/3035static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {3036__Pyx_RefNannyDeclarations3037__Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);3038__pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));30393040/* function exit code */3041__Pyx_RefNannyFinishContext();3042}30433044static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {3045__Pyx_RefNannyDeclarations3046int __pyx_t_1;3047__Pyx_RefNannySetupContext("__releasebuffer__", 0);30483049/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3383050*3051* def __releasebuffer__(ndarray self, Py_buffer* info):3052* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<3053* PyObject_Free(info.format)3054* if sizeof(npy_intp) != sizeof(Py_ssize_t):3055*/3056__pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);3057if (__pyx_t_1) {30583059/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3393060* def __releasebuffer__(ndarray self, Py_buffer* info):3061* if PyArray_HASFIELDS(self):3062* PyObject_Free(info.format) # <<<<<<<<<<<<<<3063* if sizeof(npy_intp) != sizeof(Py_ssize_t):3064* PyObject_Free(info.strides)3065*/3066PyObject_Free(__pyx_v_info->format);30673068/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3383069*3070* def __releasebuffer__(ndarray self, Py_buffer* info):3071* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<3072* PyObject_Free(info.format)3073* if sizeof(npy_intp) != sizeof(Py_ssize_t):3074*/3075}30763077/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3403078* if PyArray_HASFIELDS(self):3079* PyObject_Free(info.format)3080* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<3081* PyObject_Free(info.strides)3082* # info.shape was stored after info.strides in the same block3083*/3084__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);3085if (__pyx_t_1) {30863087/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3413088* PyObject_Free(info.format)3089* if sizeof(npy_intp) != sizeof(Py_ssize_t):3090* PyObject_Free(info.strides) # <<<<<<<<<<<<<<3091* # info.shape was stored after info.strides in the same block3092*3093*/3094PyObject_Free(__pyx_v_info->strides);30953096/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3403097* if PyArray_HASFIELDS(self):3098* PyObject_Free(info.format)3099* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<3100* PyObject_Free(info.strides)3101* # info.shape was stored after info.strides in the same block3102*/3103}31043105/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3373106* f[0] = c'\0' # Terminate format string3107*3108* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<3109* if PyArray_HASFIELDS(self):3110* PyObject_Free(info.format)3111*/31123113/* function exit code */3114__Pyx_RefNannyFinishContext();3115}31163117/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8213118* ctypedef npy_cdouble complex_t3119*3120* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<3121* return PyArray_MultiIterNew(1, <void*>a)3122*3123*/31243125static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {3126PyObject *__pyx_r = NULL;3127__Pyx_RefNannyDeclarations3128PyObject *__pyx_t_1 = NULL;3129__Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);31303131/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8223132*3133* cdef inline object PyArray_MultiIterNew1(a):3134* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<3135*3136* cdef inline object PyArray_MultiIterNew2(a, b):3137*/3138__Pyx_XDECREF(__pyx_r);3139__pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 822, __pyx_L1_error)3140__Pyx_GOTREF(__pyx_t_1);3141__pyx_r = __pyx_t_1;3142__pyx_t_1 = 0;3143goto __pyx_L0;31443145/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8213146* ctypedef npy_cdouble complex_t3147*3148* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<3149* return PyArray_MultiIterNew(1, <void*>a)3150*3151*/31523153/* function exit code */3154__pyx_L1_error:;3155__Pyx_XDECREF(__pyx_t_1);3156__Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);3157__pyx_r = 0;3158__pyx_L0:;3159__Pyx_XGIVEREF(__pyx_r);3160__Pyx_RefNannyFinishContext();3161return __pyx_r;3162}31633164/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8243165* return PyArray_MultiIterNew(1, <void*>a)3166*3167* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<3168* return PyArray_MultiIterNew(2, <void*>a, <void*>b)3169*3170*/31713172static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {3173PyObject *__pyx_r = NULL;3174__Pyx_RefNannyDeclarations3175PyObject *__pyx_t_1 = NULL;3176__Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);31773178/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8253179*3180* cdef inline object PyArray_MultiIterNew2(a, b):3181* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<3182*3183* cdef inline object PyArray_MultiIterNew3(a, b, c):3184*/3185__Pyx_XDECREF(__pyx_r);3186__pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 825, __pyx_L1_error)3187__Pyx_GOTREF(__pyx_t_1);3188__pyx_r = __pyx_t_1;3189__pyx_t_1 = 0;3190goto __pyx_L0;31913192/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8243193* return PyArray_MultiIterNew(1, <void*>a)3194*3195* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<3196* return PyArray_MultiIterNew(2, <void*>a, <void*>b)3197*3198*/31993200/* function exit code */3201__pyx_L1_error:;3202__Pyx_XDECREF(__pyx_t_1);3203__Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);3204__pyx_r = 0;3205__pyx_L0:;3206__Pyx_XGIVEREF(__pyx_r);3207__Pyx_RefNannyFinishContext();3208return __pyx_r;3209}32103211/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8273212* return PyArray_MultiIterNew(2, <void*>a, <void*>b)3213*3214* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<3215* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)3216*3217*/32183219static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {3220PyObject *__pyx_r = NULL;3221__Pyx_RefNannyDeclarations3222PyObject *__pyx_t_1 = NULL;3223__Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);32243225/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8283226*3227* cdef inline object PyArray_MultiIterNew3(a, b, c):3228* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<3229*3230* cdef inline object PyArray_MultiIterNew4(a, b, c, d):3231*/3232__Pyx_XDECREF(__pyx_r);3233__pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 828, __pyx_L1_error)3234__Pyx_GOTREF(__pyx_t_1);3235__pyx_r = __pyx_t_1;3236__pyx_t_1 = 0;3237goto __pyx_L0;32383239/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8273240* return PyArray_MultiIterNew(2, <void*>a, <void*>b)3241*3242* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<3243* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)3244*3245*/32463247/* function exit code */3248__pyx_L1_error:;3249__Pyx_XDECREF(__pyx_t_1);3250__Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);3251__pyx_r = 0;3252__pyx_L0:;3253__Pyx_XGIVEREF(__pyx_r);3254__Pyx_RefNannyFinishContext();3255return __pyx_r;3256}32573258/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8303259* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)3260*3261* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<3262* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)3263*3264*/32653266static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {3267PyObject *__pyx_r = NULL;3268__Pyx_RefNannyDeclarations3269PyObject *__pyx_t_1 = NULL;3270__Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);32713272/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8313273*3274* cdef inline object PyArray_MultiIterNew4(a, b, c, d):3275* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<3276*3277* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):3278*/3279__Pyx_XDECREF(__pyx_r);3280__pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 831, __pyx_L1_error)3281__Pyx_GOTREF(__pyx_t_1);3282__pyx_r = __pyx_t_1;3283__pyx_t_1 = 0;3284goto __pyx_L0;32853286/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8303287* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)3288*3289* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<3290* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)3291*3292*/32933294/* function exit code */3295__pyx_L1_error:;3296__Pyx_XDECREF(__pyx_t_1);3297__Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);3298__pyx_r = 0;3299__pyx_L0:;3300__Pyx_XGIVEREF(__pyx_r);3301__Pyx_RefNannyFinishContext();3302return __pyx_r;3303}33043305/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8333306* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)3307*3308* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<3309* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)3310*3311*/33123313static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {3314PyObject *__pyx_r = NULL;3315__Pyx_RefNannyDeclarations3316PyObject *__pyx_t_1 = NULL;3317__Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);33183319/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8343320*3321* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):3322* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<3323*3324* cdef inline tuple PyDataType_SHAPE(dtype d):3325*/3326__Pyx_XDECREF(__pyx_r);3327__pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 834, __pyx_L1_error)3328__Pyx_GOTREF(__pyx_t_1);3329__pyx_r = __pyx_t_1;3330__pyx_t_1 = 0;3331goto __pyx_L0;33323333/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8333334* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)3335*3336* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<3337* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)3338*3339*/33403341/* function exit code */3342__pyx_L1_error:;3343__Pyx_XDECREF(__pyx_t_1);3344__Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);3345__pyx_r = 0;3346__pyx_L0:;3347__Pyx_XGIVEREF(__pyx_r);3348__Pyx_RefNannyFinishContext();3349return __pyx_r;3350}33513352/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8363353* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)3354*3355* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<3356* if PyDataType_HASSUBARRAY(d):3357* return <tuple>d.subarray.shape3358*/33593360static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {3361PyObject *__pyx_r = NULL;3362__Pyx_RefNannyDeclarations3363int __pyx_t_1;3364__Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);33653366/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8373367*3368* cdef inline tuple PyDataType_SHAPE(dtype d):3369* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<3370* return <tuple>d.subarray.shape3371* else:3372*/3373__pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);3374if (__pyx_t_1) {33753376/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8383377* cdef inline tuple PyDataType_SHAPE(dtype d):3378* if PyDataType_HASSUBARRAY(d):3379* return <tuple>d.subarray.shape # <<<<<<<<<<<<<<3380* else:3381* return ()3382*/3383__Pyx_XDECREF(__pyx_r);3384__Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));3385__pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);3386goto __pyx_L0;33873388/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8373389*3390* cdef inline tuple PyDataType_SHAPE(dtype d):3391* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<3392* return <tuple>d.subarray.shape3393* else:3394*/3395}33963397/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8403398* return <tuple>d.subarray.shape3399* else:3400* return () # <<<<<<<<<<<<<<3401*3402* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:3403*/3404/*else*/ {3405__Pyx_XDECREF(__pyx_r);3406__Pyx_INCREF(__pyx_empty_tuple);3407__pyx_r = __pyx_empty_tuple;3408goto __pyx_L0;3409}34103411/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8363412* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)3413*3414* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<3415* if PyDataType_HASSUBARRAY(d):3416* return <tuple>d.subarray.shape3417*/34183419/* function exit code */3420__pyx_L0:;3421__Pyx_XGIVEREF(__pyx_r);3422__Pyx_RefNannyFinishContext();3423return __pyx_r;3424}34253426/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8423427* return ()3428*3429* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<3430* # Recursive utility function used in __getbuffer__ to get format3431* # string. The new location in the format string is returned.3432*/34333434static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {3435PyArray_Descr *__pyx_v_child = 0;3436int __pyx_v_endian_detector;3437int __pyx_v_little_endian;3438PyObject *__pyx_v_fields = 0;3439PyObject *__pyx_v_childname = NULL;3440PyObject *__pyx_v_new_offset = NULL;3441PyObject *__pyx_v_t = NULL;3442char *__pyx_r;3443__Pyx_RefNannyDeclarations3444PyObject *__pyx_t_1 = NULL;3445Py_ssize_t __pyx_t_2;3446PyObject *__pyx_t_3 = NULL;3447PyObject *__pyx_t_4 = NULL;3448int __pyx_t_5;3449int __pyx_t_6;3450int __pyx_t_7;3451long __pyx_t_8;3452char *__pyx_t_9;3453__Pyx_RefNannySetupContext("_util_dtypestring", 0);34543455/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8473456*3457* cdef dtype child3458* cdef int endian_detector = 1 # <<<<<<<<<<<<<<3459* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)3460* cdef tuple fields3461*/3462__pyx_v_endian_detector = 1;34633464/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8483465* cdef dtype child3466* cdef int endian_detector = 13467* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<3468* cdef tuple fields3469*3470*/3471__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);34723473/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8513474* cdef tuple fields3475*3476* for childname in descr.names: # <<<<<<<<<<<<<<3477* fields = descr.fields[childname]3478* child, new_offset = fields3479*/3480if (unlikely(__pyx_v_descr->names == Py_None)) {3481PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");3482__PYX_ERR(1, 851, __pyx_L1_error)3483}3484__pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;3485for (;;) {3486if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;3487#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS3488__pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 851, __pyx_L1_error)3489#else3490__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 851, __pyx_L1_error)3491__Pyx_GOTREF(__pyx_t_3);3492#endif3493__Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);3494__pyx_t_3 = 0;34953496/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8523497*3498* for childname in descr.names:3499* fields = descr.fields[childname] # <<<<<<<<<<<<<<3500* child, new_offset = fields3501*3502*/3503if (unlikely(__pyx_v_descr->fields == Py_None)) {3504PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");3505__PYX_ERR(1, 852, __pyx_L1_error)3506}3507__pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 852, __pyx_L1_error)3508__Pyx_GOTREF(__pyx_t_3);3509if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 852, __pyx_L1_error)3510__Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));3511__pyx_t_3 = 0;35123513/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8533514* for childname in descr.names:3515* fields = descr.fields[childname]3516* child, new_offset = fields # <<<<<<<<<<<<<<3517*3518* if (end - f) - <int>(new_offset - offset[0]) < 15:3519*/3520if (likely(__pyx_v_fields != Py_None)) {3521PyObject* sequence = __pyx_v_fields;3522Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);3523if (unlikely(size != 2)) {3524if (size > 2) __Pyx_RaiseTooManyValuesError(2);3525else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);3526__PYX_ERR(1, 853, __pyx_L1_error)3527}3528#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS3529__pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);3530__pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);3531__Pyx_INCREF(__pyx_t_3);3532__Pyx_INCREF(__pyx_t_4);3533#else3534__pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 853, __pyx_L1_error)3535__Pyx_GOTREF(__pyx_t_3);3536__pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 853, __pyx_L1_error)3537__Pyx_GOTREF(__pyx_t_4);3538#endif3539} else {3540__Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 853, __pyx_L1_error)3541}3542if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 853, __pyx_L1_error)3543__Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));3544__pyx_t_3 = 0;3545__Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);3546__pyx_t_4 = 0;35473548/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8553549* child, new_offset = fields3550*3551* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<3552* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")3553*3554*/3555__pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 855, __pyx_L1_error)3556__Pyx_GOTREF(__pyx_t_4);3557__pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 855, __pyx_L1_error)3558__Pyx_GOTREF(__pyx_t_3);3559__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3560__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 855, __pyx_L1_error)3561__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3562__pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);3563if (unlikely(__pyx_t_6)) {35643565/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8563566*3567* if (end - f) - <int>(new_offset - offset[0]) < 15:3568* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<3569*3570* if ((child.byteorder == c'>' and little_endian) or3571*/3572__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 856, __pyx_L1_error)3573__Pyx_GOTREF(__pyx_t_3);3574__Pyx_Raise(__pyx_t_3, 0, 0, 0);3575__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3576__PYX_ERR(1, 856, __pyx_L1_error)35773578/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8553579* child, new_offset = fields3580*3581* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<3582* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")3583*3584*/3585}35863587/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8583588* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")3589*3590* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<3591* (child.byteorder == c'<' and not little_endian)):3592* raise ValueError(u"Non-native byte order not supported")3593*/3594__pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);3595if (!__pyx_t_7) {3596goto __pyx_L8_next_or;3597} else {3598}3599__pyx_t_7 = (__pyx_v_little_endian != 0);3600if (!__pyx_t_7) {3601} else {3602__pyx_t_6 = __pyx_t_7;3603goto __pyx_L7_bool_binop_done;3604}3605__pyx_L8_next_or:;36063607/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8593608*3609* if ((child.byteorder == c'>' and little_endian) or3610* (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<3611* raise ValueError(u"Non-native byte order not supported")3612* # One could encode it in the format string and have Cython3613*/3614__pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);3615if (__pyx_t_7) {3616} else {3617__pyx_t_6 = __pyx_t_7;3618goto __pyx_L7_bool_binop_done;3619}3620__pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);3621__pyx_t_6 = __pyx_t_7;3622__pyx_L7_bool_binop_done:;36233624/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8583625* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")3626*3627* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<3628* (child.byteorder == c'<' and not little_endian)):3629* raise ValueError(u"Non-native byte order not supported")3630*/3631if (unlikely(__pyx_t_6)) {36323633/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8603634* if ((child.byteorder == c'>' and little_endian) or3635* (child.byteorder == c'<' and not little_endian)):3636* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<3637* # One could encode it in the format string and have Cython3638* # complain instead, BUT: < and > in format strings also imply3639*/3640__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 860, __pyx_L1_error)3641__Pyx_GOTREF(__pyx_t_3);3642__Pyx_Raise(__pyx_t_3, 0, 0, 0);3643__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3644__PYX_ERR(1, 860, __pyx_L1_error)36453646/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8583647* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")3648*3649* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<3650* (child.byteorder == c'<' and not little_endian)):3651* raise ValueError(u"Non-native byte order not supported")3652*/3653}36543655/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8703656*3657* # Output padding bytes3658* while offset[0] < new_offset: # <<<<<<<<<<<<<<3659* f[0] = 120 # "x"; pad byte3660* f += 13661*/3662while (1) {3663__pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 870, __pyx_L1_error)3664__Pyx_GOTREF(__pyx_t_3);3665__pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 870, __pyx_L1_error)3666__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3667__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 870, __pyx_L1_error)3668__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3669if (!__pyx_t_6) break;36703671/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8713672* # Output padding bytes3673* while offset[0] < new_offset:3674* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<3675* f += 13676* offset[0] += 13677*/3678(__pyx_v_f[0]) = 0x78;36793680/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8723681* while offset[0] < new_offset:3682* f[0] = 120 # "x"; pad byte3683* f += 1 # <<<<<<<<<<<<<<3684* offset[0] += 13685*3686*/3687__pyx_v_f = (__pyx_v_f + 1);36883689/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8733690* f[0] = 120 # "x"; pad byte3691* f += 13692* offset[0] += 1 # <<<<<<<<<<<<<<3693*3694* offset[0] += child.itemsize3695*/3696__pyx_t_8 = 0;3697(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);3698}36993700/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8753701* offset[0] += 13702*3703* offset[0] += child.itemsize # <<<<<<<<<<<<<<3704*3705* if not PyDataType_HASFIELDS(child):3706*/3707__pyx_t_8 = 0;3708(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);37093710/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8773711* offset[0] += child.itemsize3712*3713* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<3714* t = child.type_num3715* if end - f < 5:3716*/3717__pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);3718if (__pyx_t_6) {37193720/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8783721*3722* if not PyDataType_HASFIELDS(child):3723* t = child.type_num # <<<<<<<<<<<<<<3724* if end - f < 5:3725* raise RuntimeError(u"Format string allocated too short.")3726*/3727__pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 878, __pyx_L1_error)3728__Pyx_GOTREF(__pyx_t_4);3729__Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);3730__pyx_t_4 = 0;37313732/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8793733* if not PyDataType_HASFIELDS(child):3734* t = child.type_num3735* if end - f < 5: # <<<<<<<<<<<<<<3736* raise RuntimeError(u"Format string allocated too short.")3737*3738*/3739__pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);3740if (unlikely(__pyx_t_6)) {37413742/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8803743* t = child.type_num3744* if end - f < 5:3745* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<3746*3747* # Until ticket #99 is fixed, use integers to avoid warnings3748*/3749__pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 880, __pyx_L1_error)3750__Pyx_GOTREF(__pyx_t_4);3751__Pyx_Raise(__pyx_t_4, 0, 0, 0);3752__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3753__PYX_ERR(1, 880, __pyx_L1_error)37543755/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8793756* if not PyDataType_HASFIELDS(child):3757* t = child.type_num3758* if end - f < 5: # <<<<<<<<<<<<<<3759* raise RuntimeError(u"Format string allocated too short.")3760*3761*/3762}37633764/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8833765*3766* # Until ticket #99 is fixed, use integers to avoid warnings3767* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<3768* elif t == NPY_UBYTE: f[0] = 66 #"B"3769* elif t == NPY_SHORT: f[0] = 104 #"h"3770*/3771__pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 883, __pyx_L1_error)3772__Pyx_GOTREF(__pyx_t_4);3773__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 883, __pyx_L1_error)3774__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3775__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 883, __pyx_L1_error)3776__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3777if (__pyx_t_6) {3778(__pyx_v_f[0]) = 98;3779goto __pyx_L15;3780}37813782/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8843783* # Until ticket #99 is fixed, use integers to avoid warnings3784* if t == NPY_BYTE: f[0] = 98 #"b"3785* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<3786* elif t == NPY_SHORT: f[0] = 104 #"h"3787* elif t == NPY_USHORT: f[0] = 72 #"H"3788*/3789__pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 884, __pyx_L1_error)3790__Pyx_GOTREF(__pyx_t_3);3791__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 884, __pyx_L1_error)3792__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3793__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 884, __pyx_L1_error)3794__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3795if (__pyx_t_6) {3796(__pyx_v_f[0]) = 66;3797goto __pyx_L15;3798}37993800/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8853801* if t == NPY_BYTE: f[0] = 98 #"b"3802* elif t == NPY_UBYTE: f[0] = 66 #"B"3803* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<3804* elif t == NPY_USHORT: f[0] = 72 #"H"3805* elif t == NPY_INT: f[0] = 105 #"i"3806*/3807__pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 885, __pyx_L1_error)3808__Pyx_GOTREF(__pyx_t_4);3809__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 885, __pyx_L1_error)3810__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3811__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 885, __pyx_L1_error)3812__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3813if (__pyx_t_6) {3814(__pyx_v_f[0]) = 0x68;3815goto __pyx_L15;3816}38173818/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8863819* elif t == NPY_UBYTE: f[0] = 66 #"B"3820* elif t == NPY_SHORT: f[0] = 104 #"h"3821* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<3822* elif t == NPY_INT: f[0] = 105 #"i"3823* elif t == NPY_UINT: f[0] = 73 #"I"3824*/3825__pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 886, __pyx_L1_error)3826__Pyx_GOTREF(__pyx_t_3);3827__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 886, __pyx_L1_error)3828__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3829__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 886, __pyx_L1_error)3830__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3831if (__pyx_t_6) {3832(__pyx_v_f[0]) = 72;3833goto __pyx_L15;3834}38353836/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8873837* elif t == NPY_SHORT: f[0] = 104 #"h"3838* elif t == NPY_USHORT: f[0] = 72 #"H"3839* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<3840* elif t == NPY_UINT: f[0] = 73 #"I"3841* elif t == NPY_LONG: f[0] = 108 #"l"3842*/3843__pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 887, __pyx_L1_error)3844__Pyx_GOTREF(__pyx_t_4);3845__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 887, __pyx_L1_error)3846__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3847__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 887, __pyx_L1_error)3848__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3849if (__pyx_t_6) {3850(__pyx_v_f[0]) = 0x69;3851goto __pyx_L15;3852}38533854/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8883855* elif t == NPY_USHORT: f[0] = 72 #"H"3856* elif t == NPY_INT: f[0] = 105 #"i"3857* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<3858* elif t == NPY_LONG: f[0] = 108 #"l"3859* elif t == NPY_ULONG: f[0] = 76 #"L"3860*/3861__pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 888, __pyx_L1_error)3862__Pyx_GOTREF(__pyx_t_3);3863__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 888, __pyx_L1_error)3864__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3865__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 888, __pyx_L1_error)3866__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3867if (__pyx_t_6) {3868(__pyx_v_f[0]) = 73;3869goto __pyx_L15;3870}38713872/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8893873* elif t == NPY_INT: f[0] = 105 #"i"3874* elif t == NPY_UINT: f[0] = 73 #"I"3875* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<3876* elif t == NPY_ULONG: f[0] = 76 #"L"3877* elif t == NPY_LONGLONG: f[0] = 113 #"q"3878*/3879__pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 889, __pyx_L1_error)3880__Pyx_GOTREF(__pyx_t_4);3881__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 889, __pyx_L1_error)3882__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3883__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 889, __pyx_L1_error)3884__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3885if (__pyx_t_6) {3886(__pyx_v_f[0]) = 0x6C;3887goto __pyx_L15;3888}38893890/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8903891* elif t == NPY_UINT: f[0] = 73 #"I"3892* elif t == NPY_LONG: f[0] = 108 #"l"3893* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<3894* elif t == NPY_LONGLONG: f[0] = 113 #"q"3895* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"3896*/3897__pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 890, __pyx_L1_error)3898__Pyx_GOTREF(__pyx_t_3);3899__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 890, __pyx_L1_error)3900__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3901__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 890, __pyx_L1_error)3902__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3903if (__pyx_t_6) {3904(__pyx_v_f[0]) = 76;3905goto __pyx_L15;3906}39073908/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8913909* elif t == NPY_LONG: f[0] = 108 #"l"3910* elif t == NPY_ULONG: f[0] = 76 #"L"3911* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<3912* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"3913* elif t == NPY_FLOAT: f[0] = 102 #"f"3914*/3915__pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 891, __pyx_L1_error)3916__Pyx_GOTREF(__pyx_t_4);3917__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 891, __pyx_L1_error)3918__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3919__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 891, __pyx_L1_error)3920__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3921if (__pyx_t_6) {3922(__pyx_v_f[0]) = 0x71;3923goto __pyx_L15;3924}39253926/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8923927* elif t == NPY_ULONG: f[0] = 76 #"L"3928* elif t == NPY_LONGLONG: f[0] = 113 #"q"3929* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<3930* elif t == NPY_FLOAT: f[0] = 102 #"f"3931* elif t == NPY_DOUBLE: f[0] = 100 #"d"3932*/3933__pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 892, __pyx_L1_error)3934__Pyx_GOTREF(__pyx_t_3);3935__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 892, __pyx_L1_error)3936__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3937__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 892, __pyx_L1_error)3938__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3939if (__pyx_t_6) {3940(__pyx_v_f[0]) = 81;3941goto __pyx_L15;3942}39433944/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8933945* elif t == NPY_LONGLONG: f[0] = 113 #"q"3946* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"3947* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<3948* elif t == NPY_DOUBLE: f[0] = 100 #"d"3949* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"3950*/3951__pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 893, __pyx_L1_error)3952__Pyx_GOTREF(__pyx_t_4);3953__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 893, __pyx_L1_error)3954__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3955__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 893, __pyx_L1_error)3956__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3957if (__pyx_t_6) {3958(__pyx_v_f[0]) = 0x66;3959goto __pyx_L15;3960}39613962/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8943963* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"3964* elif t == NPY_FLOAT: f[0] = 102 #"f"3965* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<3966* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"3967* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf3968*/3969__pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 894, __pyx_L1_error)3970__Pyx_GOTREF(__pyx_t_3);3971__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 894, __pyx_L1_error)3972__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3973__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 894, __pyx_L1_error)3974__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3975if (__pyx_t_6) {3976(__pyx_v_f[0]) = 0x64;3977goto __pyx_L15;3978}39793980/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8953981* elif t == NPY_FLOAT: f[0] = 102 #"f"3982* elif t == NPY_DOUBLE: f[0] = 100 #"d"3983* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<3984* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf3985* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd3986*/3987__pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 895, __pyx_L1_error)3988__Pyx_GOTREF(__pyx_t_4);3989__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 895, __pyx_L1_error)3990__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;3991__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 895, __pyx_L1_error)3992__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;3993if (__pyx_t_6) {3994(__pyx_v_f[0]) = 0x67;3995goto __pyx_L15;3996}39973998/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8963999* elif t == NPY_DOUBLE: f[0] = 100 #"d"4000* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"4001* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<4002* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd4003* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg4004*/4005__pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 896, __pyx_L1_error)4006__Pyx_GOTREF(__pyx_t_3);4007__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 896, __pyx_L1_error)4008__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;4009__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 896, __pyx_L1_error)4010__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;4011if (__pyx_t_6) {4012(__pyx_v_f[0]) = 90;4013(__pyx_v_f[1]) = 0x66;4014__pyx_v_f = (__pyx_v_f + 1);4015goto __pyx_L15;4016}40174018/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8974019* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"4020* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf4021* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<4022* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg4023* elif t == NPY_OBJECT: f[0] = 79 #"O"4024*/4025__pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 897, __pyx_L1_error)4026__Pyx_GOTREF(__pyx_t_4);4027__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 897, __pyx_L1_error)4028__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;4029__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 897, __pyx_L1_error)4030__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;4031if (__pyx_t_6) {4032(__pyx_v_f[0]) = 90;4033(__pyx_v_f[1]) = 0x64;4034__pyx_v_f = (__pyx_v_f + 1);4035goto __pyx_L15;4036}40374038/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8984039* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf4040* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd4041* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<4042* elif t == NPY_OBJECT: f[0] = 79 #"O"4043* else:4044*/4045__pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 898, __pyx_L1_error)4046__Pyx_GOTREF(__pyx_t_3);4047__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 898, __pyx_L1_error)4048__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;4049__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 898, __pyx_L1_error)4050__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;4051if (__pyx_t_6) {4052(__pyx_v_f[0]) = 90;4053(__pyx_v_f[1]) = 0x67;4054__pyx_v_f = (__pyx_v_f + 1);4055goto __pyx_L15;4056}40574058/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8994059* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd4060* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg4061* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<4062* else:4063* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)4064*/4065__pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 899, __pyx_L1_error)4066__Pyx_GOTREF(__pyx_t_4);4067__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 899, __pyx_L1_error)4068__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;4069__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 899, __pyx_L1_error)4070__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;4071if (likely(__pyx_t_6)) {4072(__pyx_v_f[0]) = 79;4073goto __pyx_L15;4074}40754076/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":9014077* elif t == NPY_OBJECT: f[0] = 79 #"O"4078* else:4079* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<4080* f += 14081* else:4082*/4083/*else*/ {4084__pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 901, __pyx_L1_error)4085__Pyx_GOTREF(__pyx_t_3);4086__pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 901, __pyx_L1_error)4087__Pyx_GOTREF(__pyx_t_4);4088__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;4089__Pyx_Raise(__pyx_t_4, 0, 0, 0);4090__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;4091__PYX_ERR(1, 901, __pyx_L1_error)4092}4093__pyx_L15:;40944095/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":9024096* else:4097* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)4098* f += 1 # <<<<<<<<<<<<<<4099* else:4100* # Cython ignores struct boundary information ("T{...}"),4101*/4102__pyx_v_f = (__pyx_v_f + 1);41034104/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8774105* offset[0] += child.itemsize4106*4107* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<4108* t = child.type_num4109* if end - f < 5:4110*/4111goto __pyx_L13;4112}41134114/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":9064115* # Cython ignores struct boundary information ("T{...}"),4116* # so don't output it4117* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<4118* return f4119*4120*/4121/*else*/ {4122__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 906, __pyx_L1_error)4123__pyx_v_f = __pyx_t_9;4124}4125__pyx_L13:;41264127/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8514128* cdef tuple fields4129*4130* for childname in descr.names: # <<<<<<<<<<<<<<4131* fields = descr.fields[childname]4132* child, new_offset = fields4133*/4134}4135__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;41364137/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":9074138* # so don't output it4139* f = _util_dtypestring(child, f, end, offset)4140* return f # <<<<<<<<<<<<<<4141*4142*4143*/4144__pyx_r = __pyx_v_f;4145goto __pyx_L0;41464147/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8424148* return ()4149*4150* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<4151* # Recursive utility function used in __getbuffer__ to get format4152* # string. The new location in the format string is returned.4153*/41544155/* function exit code */4156__pyx_L1_error:;4157__Pyx_XDECREF(__pyx_t_1);4158__Pyx_XDECREF(__pyx_t_3);4159__Pyx_XDECREF(__pyx_t_4);4160__Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);4161__pyx_r = NULL;4162__pyx_L0:;4163__Pyx_XDECREF((PyObject *)__pyx_v_child);4164__Pyx_XDECREF(__pyx_v_fields);4165__Pyx_XDECREF(__pyx_v_childname);4166__Pyx_XDECREF(__pyx_v_new_offset);4167__Pyx_XDECREF(__pyx_v_t);4168__Pyx_RefNannyFinishContext();4169return __pyx_r;4170}41714172/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10224173* int _import_umath() except -14174*4175* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<4176* Py_INCREF(base) # important to do this before stealing the reference below!4177* PyArray_SetBaseObject(arr, base)4178*/41794180static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {4181__Pyx_RefNannyDeclarations4182__Pyx_RefNannySetupContext("set_array_base", 0);41834184/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10234185*4186* cdef inline void set_array_base(ndarray arr, object base):4187* Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<4188* PyArray_SetBaseObject(arr, base)4189*4190*/4191Py_INCREF(__pyx_v_base);41924193/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10244194* cdef inline void set_array_base(ndarray arr, object base):4195* Py_INCREF(base) # important to do this before stealing the reference below!4196* PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<4197*4198* cdef inline object get_array_base(ndarray arr):4199*/4200(void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));42014202/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10224203* int _import_umath() except -14204*4205* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<4206* Py_INCREF(base) # important to do this before stealing the reference below!4207* PyArray_SetBaseObject(arr, base)4208*/42094210/* function exit code */4211__Pyx_RefNannyFinishContext();4212}42134214/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10264215* PyArray_SetBaseObject(arr, base)4216*4217* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<4218* base = PyArray_BASE(arr)4219* if base is NULL:4220*/42214222static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {4223PyObject *__pyx_v_base;4224PyObject *__pyx_r = NULL;4225__Pyx_RefNannyDeclarations4226int __pyx_t_1;4227__Pyx_RefNannySetupContext("get_array_base", 0);42284229/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10274230*4231* cdef inline object get_array_base(ndarray arr):4232* base = PyArray_BASE(arr) # <<<<<<<<<<<<<<4233* if base is NULL:4234* return None4235*/4236__pyx_v_base = PyArray_BASE(__pyx_v_arr);42374238/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10284239* cdef inline object get_array_base(ndarray arr):4240* base = PyArray_BASE(arr)4241* if base is NULL: # <<<<<<<<<<<<<<4242* return None4243* return <object>base4244*/4245__pyx_t_1 = ((__pyx_v_base == NULL) != 0);4246if (__pyx_t_1) {42474248/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10294249* base = PyArray_BASE(arr)4250* if base is NULL:4251* return None # <<<<<<<<<<<<<<4252* return <object>base4253*4254*/4255__Pyx_XDECREF(__pyx_r);4256__pyx_r = Py_None; __Pyx_INCREF(Py_None);4257goto __pyx_L0;42584259/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10284260* cdef inline object get_array_base(ndarray arr):4261* base = PyArray_BASE(arr)4262* if base is NULL: # <<<<<<<<<<<<<<4263* return None4264* return <object>base4265*/4266}42674268/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10304269* if base is NULL:4270* return None4271* return <object>base # <<<<<<<<<<<<<<4272*4273* # Versions of the import_* functions which are more suitable for4274*/4275__Pyx_XDECREF(__pyx_r);4276__Pyx_INCREF(((PyObject *)__pyx_v_base));4277__pyx_r = ((PyObject *)__pyx_v_base);4278goto __pyx_L0;42794280/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10264281* PyArray_SetBaseObject(arr, base)4282*4283* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<4284* base = PyArray_BASE(arr)4285* if base is NULL:4286*/42874288/* function exit code */4289__pyx_L0:;4290__Pyx_XGIVEREF(__pyx_r);4291__Pyx_RefNannyFinishContext();4292return __pyx_r;4293}42944295/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10344296* # Versions of the import_* functions which are more suitable for4297* # Cython code.4298* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<4299* try:4300* _import_array()4301*/43024303static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {4304int __pyx_r;4305__Pyx_RefNannyDeclarations4306PyObject *__pyx_t_1 = NULL;4307PyObject *__pyx_t_2 = NULL;4308PyObject *__pyx_t_3 = NULL;4309int __pyx_t_4;4310PyObject *__pyx_t_5 = NULL;4311PyObject *__pyx_t_6 = NULL;4312PyObject *__pyx_t_7 = NULL;4313PyObject *__pyx_t_8 = NULL;4314__Pyx_RefNannySetupContext("import_array", 0);43154316/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10354317* # Cython code.4318* cdef inline int import_array() except -1:4319* try: # <<<<<<<<<<<<<<4320* _import_array()4321* except Exception:4322*/4323{4324__Pyx_PyThreadState_declare4325__Pyx_PyThreadState_assign4326__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);4327__Pyx_XGOTREF(__pyx_t_1);4328__Pyx_XGOTREF(__pyx_t_2);4329__Pyx_XGOTREF(__pyx_t_3);4330/*try:*/ {43314332/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10364333* cdef inline int import_array() except -1:4334* try:4335* _import_array() # <<<<<<<<<<<<<<4336* except Exception:4337* raise ImportError("numpy.core.multiarray failed to import")4338*/4339__pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1036, __pyx_L3_error)43404341/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10354342* # Cython code.4343* cdef inline int import_array() except -1:4344* try: # <<<<<<<<<<<<<<4345* _import_array()4346* except Exception:4347*/4348}4349__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;4350__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;4351__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;4352goto __pyx_L8_try_end;4353__pyx_L3_error:;43544355/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10374356* try:4357* _import_array()4358* except Exception: # <<<<<<<<<<<<<<4359* raise ImportError("numpy.core.multiarray failed to import")4360*4361*/4362__pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));4363if (__pyx_t_4) {4364__Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);4365if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1037, __pyx_L5_except_error)4366__Pyx_GOTREF(__pyx_t_5);4367__Pyx_GOTREF(__pyx_t_6);4368__Pyx_GOTREF(__pyx_t_7);43694370/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10384371* _import_array()4372* except Exception:4373* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<4374*4375* cdef inline int import_umath() except -1:4376*/4377__pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1038, __pyx_L5_except_error)4378__Pyx_GOTREF(__pyx_t_8);4379__Pyx_Raise(__pyx_t_8, 0, 0, 0);4380__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;4381__PYX_ERR(1, 1038, __pyx_L5_except_error)4382}4383goto __pyx_L5_except_error;4384__pyx_L5_except_error:;43854386/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10354387* # Cython code.4388* cdef inline int import_array() except -1:4389* try: # <<<<<<<<<<<<<<4390* _import_array()4391* except Exception:4392*/4393__Pyx_XGIVEREF(__pyx_t_1);4394__Pyx_XGIVEREF(__pyx_t_2);4395__Pyx_XGIVEREF(__pyx_t_3);4396__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);4397goto __pyx_L1_error;4398__pyx_L8_try_end:;4399}44004401/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10344402* # Versions of the import_* functions which are more suitable for4403* # Cython code.4404* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<4405* try:4406* _import_array()4407*/44084409/* function exit code */4410__pyx_r = 0;4411goto __pyx_L0;4412__pyx_L1_error:;4413__Pyx_XDECREF(__pyx_t_5);4414__Pyx_XDECREF(__pyx_t_6);4415__Pyx_XDECREF(__pyx_t_7);4416__Pyx_XDECREF(__pyx_t_8);4417__Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);4418__pyx_r = -1;4419__pyx_L0:;4420__Pyx_RefNannyFinishContext();4421return __pyx_r;4422}44234424/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10404425* raise ImportError("numpy.core.multiarray failed to import")4426*4427* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<4428* try:4429* _import_umath()4430*/44314432static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {4433int __pyx_r;4434__Pyx_RefNannyDeclarations4435PyObject *__pyx_t_1 = NULL;4436PyObject *__pyx_t_2 = NULL;4437PyObject *__pyx_t_3 = NULL;4438int __pyx_t_4;4439PyObject *__pyx_t_5 = NULL;4440PyObject *__pyx_t_6 = NULL;4441PyObject *__pyx_t_7 = NULL;4442PyObject *__pyx_t_8 = NULL;4443__Pyx_RefNannySetupContext("import_umath", 0);44444445/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10414446*4447* cdef inline int import_umath() except -1:4448* try: # <<<<<<<<<<<<<<4449* _import_umath()4450* except Exception:4451*/4452{4453__Pyx_PyThreadState_declare4454__Pyx_PyThreadState_assign4455__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);4456__Pyx_XGOTREF(__pyx_t_1);4457__Pyx_XGOTREF(__pyx_t_2);4458__Pyx_XGOTREF(__pyx_t_3);4459/*try:*/ {44604461/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10424462* cdef inline int import_umath() except -1:4463* try:4464* _import_umath() # <<<<<<<<<<<<<<4465* except Exception:4466* raise ImportError("numpy.core.umath failed to import")4467*/4468__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1042, __pyx_L3_error)44694470/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10414471*4472* cdef inline int import_umath() except -1:4473* try: # <<<<<<<<<<<<<<4474* _import_umath()4475* except Exception:4476*/4477}4478__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;4479__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;4480__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;4481goto __pyx_L8_try_end;4482__pyx_L3_error:;44834484/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10434485* try:4486* _import_umath()4487* except Exception: # <<<<<<<<<<<<<<4488* raise ImportError("numpy.core.umath failed to import")4489*4490*/4491__pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));4492if (__pyx_t_4) {4493__Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);4494if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1043, __pyx_L5_except_error)4495__Pyx_GOTREF(__pyx_t_5);4496__Pyx_GOTREF(__pyx_t_6);4497__Pyx_GOTREF(__pyx_t_7);44984499/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10444500* _import_umath()4501* except Exception:4502* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<4503*4504* cdef inline int import_ufunc() except -1:4505*/4506__pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1044, __pyx_L5_except_error)4507__Pyx_GOTREF(__pyx_t_8);4508__Pyx_Raise(__pyx_t_8, 0, 0, 0);4509__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;4510__PYX_ERR(1, 1044, __pyx_L5_except_error)4511}4512goto __pyx_L5_except_error;4513__pyx_L5_except_error:;45144515/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10414516*4517* cdef inline int import_umath() except -1:4518* try: # <<<<<<<<<<<<<<4519* _import_umath()4520* except Exception:4521*/4522__Pyx_XGIVEREF(__pyx_t_1);4523__Pyx_XGIVEREF(__pyx_t_2);4524__Pyx_XGIVEREF(__pyx_t_3);4525__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);4526goto __pyx_L1_error;4527__pyx_L8_try_end:;4528}45294530/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10404531* raise ImportError("numpy.core.multiarray failed to import")4532*4533* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<4534* try:4535* _import_umath()4536*/45374538/* function exit code */4539__pyx_r = 0;4540goto __pyx_L0;4541__pyx_L1_error:;4542__Pyx_XDECREF(__pyx_t_5);4543__Pyx_XDECREF(__pyx_t_6);4544__Pyx_XDECREF(__pyx_t_7);4545__Pyx_XDECREF(__pyx_t_8);4546__Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);4547__pyx_r = -1;4548__pyx_L0:;4549__Pyx_RefNannyFinishContext();4550return __pyx_r;4551}45524553/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10464554* raise ImportError("numpy.core.umath failed to import")4555*4556* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<4557* try:4558* _import_umath()4559*/45604561static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {4562int __pyx_r;4563__Pyx_RefNannyDeclarations4564PyObject *__pyx_t_1 = NULL;4565PyObject *__pyx_t_2 = NULL;4566PyObject *__pyx_t_3 = NULL;4567int __pyx_t_4;4568PyObject *__pyx_t_5 = NULL;4569PyObject *__pyx_t_6 = NULL;4570PyObject *__pyx_t_7 = NULL;4571PyObject *__pyx_t_8 = NULL;4572__Pyx_RefNannySetupContext("import_ufunc", 0);45734574/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10474575*4576* cdef inline int import_ufunc() except -1:4577* try: # <<<<<<<<<<<<<<4578* _import_umath()4579* except Exception:4580*/4581{4582__Pyx_PyThreadState_declare4583__Pyx_PyThreadState_assign4584__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);4585__Pyx_XGOTREF(__pyx_t_1);4586__Pyx_XGOTREF(__pyx_t_2);4587__Pyx_XGOTREF(__pyx_t_3);4588/*try:*/ {45894590/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10484591* cdef inline int import_ufunc() except -1:4592* try:4593* _import_umath() # <<<<<<<<<<<<<<4594* except Exception:4595* raise ImportError("numpy.core.umath failed to import")4596*/4597__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1048, __pyx_L3_error)45984599/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10474600*4601* cdef inline int import_ufunc() except -1:4602* try: # <<<<<<<<<<<<<<4603* _import_umath()4604* except Exception:4605*/4606}4607__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;4608__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;4609__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;4610goto __pyx_L8_try_end;4611__pyx_L3_error:;46124613/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10494614* try:4615* _import_umath()4616* except Exception: # <<<<<<<<<<<<<<4617* raise ImportError("numpy.core.umath failed to import")4618*/4619__pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));4620if (__pyx_t_4) {4621__Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);4622if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1049, __pyx_L5_except_error)4623__Pyx_GOTREF(__pyx_t_5);4624__Pyx_GOTREF(__pyx_t_6);4625__Pyx_GOTREF(__pyx_t_7);46264627/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10504628* _import_umath()4629* except Exception:4630* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<4631*/4632__pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1050, __pyx_L5_except_error)4633__Pyx_GOTREF(__pyx_t_8);4634__Pyx_Raise(__pyx_t_8, 0, 0, 0);4635__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;4636__PYX_ERR(1, 1050, __pyx_L5_except_error)4637}4638goto __pyx_L5_except_error;4639__pyx_L5_except_error:;46404641/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10474642*4643* cdef inline int import_ufunc() except -1:4644* try: # <<<<<<<<<<<<<<4645* _import_umath()4646* except Exception:4647*/4648__Pyx_XGIVEREF(__pyx_t_1);4649__Pyx_XGIVEREF(__pyx_t_2);4650__Pyx_XGIVEREF(__pyx_t_3);4651__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);4652goto __pyx_L1_error;4653__pyx_L8_try_end:;4654}46554656/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10464657* raise ImportError("numpy.core.umath failed to import")4658*4659* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<4660* try:4661* _import_umath()4662*/46634664/* function exit code */4665__pyx_r = 0;4666goto __pyx_L0;4667__pyx_L1_error:;4668__Pyx_XDECREF(__pyx_t_5);4669__Pyx_XDECREF(__pyx_t_6);4670__Pyx_XDECREF(__pyx_t_7);4671__Pyx_XDECREF(__pyx_t_8);4672__Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);4673__pyx_r = -1;4674__pyx_L0:;4675__Pyx_RefNannyFinishContext();4676return __pyx_r;4677}46784679static PyMethodDef __pyx_methods[] = {4680{0, 0, 0, 0}4681};46824683#if PY_MAJOR_VERSION >= 34684#if CYTHON_PEP489_MULTI_PHASE_INIT4685static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/4686static int __pyx_pymod_exec_poly_nms(PyObject* module); /*proto*/4687static PyModuleDef_Slot __pyx_moduledef_slots[] = {4688{Py_mod_create, (void*)__pyx_pymod_create},4689{Py_mod_exec, (void*)__pyx_pymod_exec_poly_nms},4690{0, NULL}4691};4692#endif46934694static struct PyModuleDef __pyx_moduledef = {4695PyModuleDef_HEAD_INIT,4696"poly_nms",46970, /* m_doc */4698#if CYTHON_PEP489_MULTI_PHASE_INIT46990, /* m_size */4700#else4701-1, /* m_size */4702#endif4703__pyx_methods /* m_methods */,4704#if CYTHON_PEP489_MULTI_PHASE_INIT4705__pyx_moduledef_slots, /* m_slots */4706#else4707NULL, /* m_reload */4708#endif4709NULL, /* m_traverse */4710NULL, /* m_clear */4711NULL /* m_free */4712};4713#endif4714#ifndef CYTHON_SMALL_CODE4715#if defined(__clang__)4716#define CYTHON_SMALL_CODE4717#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))4718#define CYTHON_SMALL_CODE __attribute__((cold))4719#else4720#define CYTHON_SMALL_CODE4721#endif4722#endif47234724static __Pyx_StringTabEntry __pyx_string_tab[] = {4725{&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},4726{&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},4727{&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},4728{&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},4729{&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},4730{&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},4731{&__pyx_n_s_argsort, __pyx_k_argsort, sizeof(__pyx_k_argsort), 0, 0, 1, 1},4732{&__pyx_n_s_boxes_dim, __pyx_k_boxes_dim, sizeof(__pyx_k_boxes_dim), 0, 0, 1, 1},4733{&__pyx_n_s_boxes_num, __pyx_k_boxes_num, sizeof(__pyx_k_boxes_num), 0, 0, 1, 1},4734{&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},4735{&__pyx_n_s_dets, __pyx_k_dets, sizeof(__pyx_k_dets), 0, 0, 1, 1},4736{&__pyx_n_s_device_id, __pyx_k_device_id, sizeof(__pyx_k_device_id), 0, 0, 1, 1},4737{&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},4738{&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},4739{&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},4740{&__pyx_n_s_keep, __pyx_k_keep, sizeof(__pyx_k_keep), 0, 0, 1, 1},4741{&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},4742{&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},4743{&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},4744{&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},4745{&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},4746{&__pyx_n_s_num_out, __pyx_k_num_out, sizeof(__pyx_k_num_out), 0, 0, 1, 1},4747{&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},4748{&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},4749{&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},4750{&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1},4751{&__pyx_n_s_poly_gpu_nms, __pyx_k_poly_gpu_nms, sizeof(__pyx_k_poly_gpu_nms), 0, 0, 1, 1},4752{&__pyx_n_s_poly_nms, __pyx_k_poly_nms, sizeof(__pyx_k_poly_nms), 0, 0, 1, 1},4753{&__pyx_kp_s_poly_nms_pyx, __pyx_k_poly_nms_pyx, sizeof(__pyx_k_poly_nms_pyx), 0, 0, 1, 0},4754{&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},4755{&__pyx_n_s_scores, __pyx_k_scores, sizeof(__pyx_k_scores), 0, 0, 1, 1},4756{&__pyx_n_s_sorted_dets, __pyx_k_sorted_dets, sizeof(__pyx_k_sorted_dets), 0, 0, 1, 1},4757{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},4758{&__pyx_n_s_thresh, __pyx_k_thresh, sizeof(__pyx_k_thresh), 0, 0, 1, 1},4759{&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},4760{&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},4761{0, 0, 0, 0, 0, 0, 0}4762};4763static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {4764__pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 272, __pyx_L1_error)4765__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 285, __pyx_L1_error)4766__pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 856, __pyx_L1_error)4767__pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 1038, __pyx_L1_error)4768return 0;4769__pyx_L1_error:;4770return -1;4771}47724773static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {4774__Pyx_RefNannyDeclarations4775__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);47764777/* "poly_nms.pyx":174778* keep = np.zeros(boxes_num, dtype=np.int32)4779* cdef np.ndarray[np.float32_t, ndim=1] \4780* scores = dets[:, 8] # <<<<<<<<<<<<<<4781* cdef np.ndarray[np.int_t, ndim=1] \4782* order = scores.argsort()[::-1]4783*/4784__pyx_slice_ = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice_)) __PYX_ERR(0, 17, __pyx_L1_error)4785__Pyx_GOTREF(__pyx_slice_);4786__Pyx_GIVEREF(__pyx_slice_);4787__pyx_tuple__2 = PyTuple_Pack(2, __pyx_slice_, __pyx_int_8); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 17, __pyx_L1_error)4788__Pyx_GOTREF(__pyx_tuple__2);4789__Pyx_GIVEREF(__pyx_tuple__2);47904791/* "poly_nms.pyx":194792* scores = dets[:, 8]4793* cdef np.ndarray[np.int_t, ndim=1] \4794* order = scores.argsort()[::-1] # <<<<<<<<<<<<<<4795* cdef np.ndarray[np.float32_t, ndim=2] \4796* sorted_dets = dets[order, :]4797*/4798__pyx_slice__3 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 19, __pyx_L1_error)4799__Pyx_GOTREF(__pyx_slice__3);4800__Pyx_GIVEREF(__pyx_slice__3);48014802/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2724803* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)4804* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):4805* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<4806*4807* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)4808*/4809__pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 272, __pyx_L1_error)4810__Pyx_GOTREF(__pyx_tuple__4);4811__Pyx_GIVEREF(__pyx_tuple__4);48124813/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":2764814* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)4815* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):4816* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<4817*4818* info.buf = PyArray_DATA(self)4819*/4820__pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 276, __pyx_L1_error)4821__Pyx_GOTREF(__pyx_tuple__5);4822__Pyx_GIVEREF(__pyx_tuple__5);48234824/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":3064825* if ((descr.byteorder == c'>' and little_endian) or4826* (descr.byteorder == c'<' and not little_endian)):4827* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<4828* if t == NPY_BYTE: f = "b"4829* elif t == NPY_UBYTE: f = "B"4830*/4831__pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 306, __pyx_L1_error)4832__Pyx_GOTREF(__pyx_tuple__6);4833__Pyx_GIVEREF(__pyx_tuple__6);48344835/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8564836*4837* if (end - f) - <int>(new_offset - offset[0]) < 15:4838* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<4839*4840* if ((child.byteorder == c'>' and little_endian) or4841*/4842__pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 856, __pyx_L1_error)4843__Pyx_GOTREF(__pyx_tuple__7);4844__Pyx_GIVEREF(__pyx_tuple__7);48454846/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":8804847* t = child.type_num4848* if end - f < 5:4849* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<4850*4851* # Until ticket #99 is fixed, use integers to avoid warnings4852*/4853__pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 880, __pyx_L1_error)4854__Pyx_GOTREF(__pyx_tuple__8);4855__Pyx_GIVEREF(__pyx_tuple__8);48564857/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10384858* _import_array()4859* except Exception:4860* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<4861*4862* cdef inline int import_umath() except -1:4863*/4864__pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 1038, __pyx_L1_error)4865__Pyx_GOTREF(__pyx_tuple__9);4866__Pyx_GIVEREF(__pyx_tuple__9);48674868/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10444869* _import_umath()4870* except Exception:4871* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<4872*4873* cdef inline int import_ufunc() except -1:4874*/4875__pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 1044, __pyx_L1_error)4876__Pyx_GOTREF(__pyx_tuple__10);4877__Pyx_GIVEREF(__pyx_tuple__10);48784879/* "poly_nms.pyx":94880* void _poly_nms(np.int32_t*, int*, np.float32_t*, int, int, float, int)4881*4882* def poly_gpu_nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh, # <<<<<<<<<<<<<<4883* np.int32_t device_id=0):4884* cdef int boxes_num = dets.shape[0]4885*/4886__pyx_tuple__11 = PyTuple_Pack(10, __pyx_n_s_dets, __pyx_n_s_thresh, __pyx_n_s_device_id, __pyx_n_s_boxes_num, __pyx_n_s_boxes_dim, __pyx_n_s_num_out, __pyx_n_s_keep, __pyx_n_s_scores, __pyx_n_s_order, __pyx_n_s_sorted_dets); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 9, __pyx_L1_error)4887__Pyx_GOTREF(__pyx_tuple__11);4888__Pyx_GIVEREF(__pyx_tuple__11);4889__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_poly_nms_pyx, __pyx_n_s_poly_gpu_nms, 9, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 9, __pyx_L1_error)4890__Pyx_RefNannyFinishContext();4891return 0;4892__pyx_L1_error:;4893__Pyx_RefNannyFinishContext();4894return -1;4895}48964897static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {4898if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);4899__pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)4900__pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)4901return 0;4902__pyx_L1_error:;4903return -1;4904}49054906static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/4907static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/4908static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/4909static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/4910static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/4911static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/4912static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/49134914static int __Pyx_modinit_global_init_code(void) {4915__Pyx_RefNannyDeclarations4916__Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);4917/*--- Global init code ---*/4918__Pyx_RefNannyFinishContext();4919return 0;4920}49214922static int __Pyx_modinit_variable_export_code(void) {4923__Pyx_RefNannyDeclarations4924__Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);4925/*--- Variable export code ---*/4926__Pyx_RefNannyFinishContext();4927return 0;4928}49294930static int __Pyx_modinit_function_export_code(void) {4931__Pyx_RefNannyDeclarations4932__Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);4933/*--- Function export code ---*/4934__Pyx_RefNannyFinishContext();4935return 0;4936}49374938static int __Pyx_modinit_type_init_code(void) {4939__Pyx_RefNannyDeclarations4940__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);4941/*--- Type init code ---*/4942__Pyx_RefNannyFinishContext();4943return 0;4944}49454946static int __Pyx_modinit_type_import_code(void) {4947__Pyx_RefNannyDeclarations4948PyObject *__pyx_t_1 = NULL;4949__Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);4950/*--- Type import code ---*/4951__pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)4952__Pyx_GOTREF(__pyx_t_1);4953__pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",4954#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B00004955sizeof(PyTypeObject),4956#else4957sizeof(PyHeapTypeObject),4958#endif4959__Pyx_ImportType_CheckSize_Warn);4960if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)4961__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;4962__pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 206, __pyx_L1_error)4963__Pyx_GOTREF(__pyx_t_1);4964__pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);4965if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 206, __pyx_L1_error)4966__pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);4967if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 229, __pyx_L1_error)4968__pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);4969if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 233, __pyx_L1_error)4970__pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);4971if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 242, __pyx_L1_error)4972__pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);4973if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 918, __pyx_L1_error)4974__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;4975__Pyx_RefNannyFinishContext();4976return 0;4977__pyx_L1_error:;4978__Pyx_XDECREF(__pyx_t_1);4979__Pyx_RefNannyFinishContext();4980return -1;4981}49824983static int __Pyx_modinit_variable_import_code(void) {4984__Pyx_RefNannyDeclarations4985__Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);4986/*--- Variable import code ---*/4987__Pyx_RefNannyFinishContext();4988return 0;4989}49904991static int __Pyx_modinit_function_import_code(void) {4992__Pyx_RefNannyDeclarations4993__Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);4994/*--- Function import code ---*/4995__Pyx_RefNannyFinishContext();4996return 0;4997}499849995000#if PY_MAJOR_VERSION < 35001#ifdef CYTHON_NO_PYINIT_EXPORT5002#define __Pyx_PyMODINIT_FUNC void5003#else5004#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC5005#endif5006#else5007#ifdef CYTHON_NO_PYINIT_EXPORT5008#define __Pyx_PyMODINIT_FUNC PyObject *5009#else5010#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC5011#endif5012#endif501350145015#if PY_MAJOR_VERSION < 35016__Pyx_PyMODINIT_FUNC initpoly_nms(void) CYTHON_SMALL_CODE; /*proto*/5017__Pyx_PyMODINIT_FUNC initpoly_nms(void)5018#else5019__Pyx_PyMODINIT_FUNC PyInit_poly_nms(void) CYTHON_SMALL_CODE; /*proto*/5020__Pyx_PyMODINIT_FUNC PyInit_poly_nms(void)5021#if CYTHON_PEP489_MULTI_PHASE_INIT5022{5023return PyModuleDef_Init(&__pyx_moduledef);5024}5025static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {5026#if PY_VERSION_HEX >= 0x030700A15027static PY_INT64_T main_interpreter_id = -1;5028PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);5029if (main_interpreter_id == -1) {5030main_interpreter_id = current_id;5031return (unlikely(current_id == -1)) ? -1 : 0;5032} else if (unlikely(main_interpreter_id != current_id))5033#else5034static PyInterpreterState *main_interpreter = NULL;5035PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;5036if (!main_interpreter) {5037main_interpreter = current_interpreter;5038} else if (unlikely(main_interpreter != current_interpreter))5039#endif5040{5041PyErr_SetString(5042PyExc_ImportError,5043"Interpreter change detected - this module can only be loaded into one interpreter per process.");5044return -1;5045}5046return 0;5047}5048static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {5049PyObject *value = PyObject_GetAttrString(spec, from_name);5050int result = 0;5051if (likely(value)) {5052if (allow_none || value != Py_None) {5053result = PyDict_SetItemString(moddict, to_name, value);5054}5055Py_DECREF(value);5056} else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {5057PyErr_Clear();5058} else {5059result = -1;5060}5061return result;5062}5063static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {5064PyObject *module = NULL, *moddict, *modname;5065if (__Pyx_check_single_interpreter())5066return NULL;5067if (__pyx_m)5068return __Pyx_NewRef(__pyx_m);5069modname = PyObject_GetAttrString(spec, "name");5070if (unlikely(!modname)) goto bad;5071module = PyModule_NewObject(modname);5072Py_DECREF(modname);5073if (unlikely(!module)) goto bad;5074moddict = PyModule_GetDict(module);5075if (unlikely(!moddict)) goto bad;5076if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;5077if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;5078if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;5079if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;5080return module;5081bad:5082Py_XDECREF(module);5083return NULL;5084}508550865087static CYTHON_SMALL_CODE int __pyx_pymod_exec_poly_nms(PyObject *__pyx_pyinit_module)5088#endif5089#endif5090{5091PyObject *__pyx_t_1 = NULL;5092__Pyx_RefNannyDeclarations5093#if CYTHON_PEP489_MULTI_PHASE_INIT5094if (__pyx_m) {5095if (__pyx_m == __pyx_pyinit_module) return 0;5096PyErr_SetString(PyExc_RuntimeError, "Module 'poly_nms' has already been imported. Re-initialisation is not supported.");5097return -1;5098}5099#elif PY_MAJOR_VERSION >= 35100if (__pyx_m) return __Pyx_NewRef(__pyx_m);5101#endif5102#if CYTHON_REFNANNY5103__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");5104if (!__Pyx_RefNanny) {5105PyErr_Clear();5106__Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");5107if (!__Pyx_RefNanny)5108Py_FatalError("failed to import 'refnanny' module");5109}5110#endif5111__Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_poly_nms(void)", 0);5112if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)5113#ifdef __Pxy_PyFrame_Initialize_Offsets5114__Pxy_PyFrame_Initialize_Offsets();5115#endif5116__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)5117__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)5118__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)5119#ifdef __Pyx_CyFunction_USED5120if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)5121#endif5122#ifdef __Pyx_FusedFunction_USED5123if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)5124#endif5125#ifdef __Pyx_Coroutine_USED5126if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)5127#endif5128#ifdef __Pyx_Generator_USED5129if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)5130#endif5131#ifdef __Pyx_AsyncGen_USED5132if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)5133#endif5134#ifdef __Pyx_StopAsyncIteration_USED5135if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)5136#endif5137/*--- Library function declarations ---*/5138/*--- Threads initialization code ---*/5139#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS5140#ifdef WITH_THREAD /* Python build with threading support? */5141PyEval_InitThreads();5142#endif5143#endif5144/*--- Module creation code ---*/5145#if CYTHON_PEP489_MULTI_PHASE_INIT5146__pyx_m = __pyx_pyinit_module;5147Py_INCREF(__pyx_m);5148#else5149#if PY_MAJOR_VERSION < 35150__pyx_m = Py_InitModule4("poly_nms", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);5151#else5152__pyx_m = PyModule_Create(&__pyx_moduledef);5153#endif5154if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)5155#endif5156__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)5157Py_INCREF(__pyx_d);5158__pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)5159Py_INCREF(__pyx_b);5160__pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)5161Py_INCREF(__pyx_cython_runtime);5162if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);5163/*--- Initialize various global constants etc. ---*/5164if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)5165#if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)5166if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)5167#endif5168if (__pyx_module_is_main_poly_nms) {5169if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)5170}5171#if PY_MAJOR_VERSION >= 35172{5173PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)5174if (!PyDict_GetItemString(modules, "poly_nms")) {5175if (unlikely(PyDict_SetItemString(modules, "poly_nms", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)5176}5177}5178#endif5179/*--- Builtin init code ---*/5180if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;5181/*--- Constants init code ---*/5182if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;5183/*--- Global type/function init code ---*/5184(void)__Pyx_modinit_global_init_code();5185(void)__Pyx_modinit_variable_export_code();5186(void)__Pyx_modinit_function_export_code();5187(void)__Pyx_modinit_type_init_code();5188if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;5189(void)__Pyx_modinit_variable_import_code();5190(void)__Pyx_modinit_function_import_code();5191/*--- Execution code ---*/5192#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)5193if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)5194#endif51955196/* "poly_nms.pyx":15197* import numpy as np # <<<<<<<<<<<<<<5198* cimport numpy as np5199*5200*/5201__pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)5202__Pyx_GOTREF(__pyx_t_1);5203if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)5204__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;52055206/* "poly_nms.pyx":45207* cimport numpy as np5208*5209* assert sizeof(int) == sizeof(np.int32_t) # <<<<<<<<<<<<<<5210*5211* cdef extern from "poly_nms.hpp":5212*/5213#ifndef CYTHON_WITHOUT_ASSERTIONS5214if (unlikely(!Py_OptimizeFlag)) {5215if (unlikely(!(((sizeof(int)) == (sizeof(__pyx_t_5numpy_int32_t))) != 0))) {5216PyErr_SetNone(PyExc_AssertionError);5217__PYX_ERR(0, 4, __pyx_L1_error)5218}5219}5220#endif52215222/* "poly_nms.pyx":95223* void _poly_nms(np.int32_t*, int*, np.float32_t*, int, int, float, int)5224*5225* def poly_gpu_nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh, # <<<<<<<<<<<<<<5226* np.int32_t device_id=0):5227* cdef int boxes_num = dets.shape[0]5228*/5229__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8poly_nms_1poly_gpu_nms, NULL, __pyx_n_s_poly_nms); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)5230__Pyx_GOTREF(__pyx_t_1);5231if (PyDict_SetItem(__pyx_d, __pyx_n_s_poly_gpu_nms, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)5232__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;52335234/* "poly_nms.pyx":15235* import numpy as np # <<<<<<<<<<<<<<5236* cimport numpy as np5237*5238*/5239__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)5240__Pyx_GOTREF(__pyx_t_1);5241if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)5242__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;52435244/* "../../../anaconda3/envs/mmdet/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":10465245* raise ImportError("numpy.core.umath failed to import")5246*5247* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<5248* try:5249* _import_umath()5250*/52515252/*--- Wrapped vars code ---*/52535254goto __pyx_L0;5255__pyx_L1_error:;5256__Pyx_XDECREF(__pyx_t_1);5257if (__pyx_m) {5258if (__pyx_d) {5259__Pyx_AddTraceback("init poly_nms", __pyx_clineno, __pyx_lineno, __pyx_filename);5260}5261Py_CLEAR(__pyx_m);5262} else if (!PyErr_Occurred()) {5263PyErr_SetString(PyExc_ImportError, "init poly_nms");5264}5265__pyx_L0:;5266__Pyx_RefNannyFinishContext();5267#if CYTHON_PEP489_MULTI_PHASE_INIT5268return (__pyx_m != NULL) ? 0 : -1;5269#elif PY_MAJOR_VERSION >= 35270return __pyx_m;5271#else5272return;5273#endif5274}52755276/* --- Runtime support code --- */5277/* Refnanny */5278#if CYTHON_REFNANNY5279static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {5280PyObject *m = NULL, *p = NULL;5281void *r = NULL;5282m = PyImport_ImportModule(modname);5283if (!m) goto end;5284p = PyObject_GetAttrString(m, "RefNannyAPI");5285if (!p) goto end;5286r = PyLong_AsVoidPtr(p);5287end:5288Py_XDECREF(p);5289Py_XDECREF(m);5290return (__Pyx_RefNannyAPIStruct *)r;5291}5292#endif52935294/* RaiseArgTupleInvalid */5295static void __Pyx_RaiseArgtupleInvalid(5296const char* func_name,5297int exact,5298Py_ssize_t num_min,5299Py_ssize_t num_max,5300Py_ssize_t num_found)5301{5302Py_ssize_t num_expected;5303const char *more_or_less;5304if (num_found < num_min) {5305num_expected = num_min;5306more_or_less = "at least";5307} else {5308num_expected = num_max;5309more_or_less = "at most";5310}5311if (exact) {5312more_or_less = "exactly";5313}5314PyErr_Format(PyExc_TypeError,5315"%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",5316func_name, more_or_less, num_expected,5317(num_expected == 1) ? "" : "s", num_found);5318}53195320/* RaiseDoubleKeywords */5321static void __Pyx_RaiseDoubleKeywordsError(5322const char* func_name,5323PyObject* kw_name)5324{5325PyErr_Format(PyExc_TypeError,5326#if PY_MAJOR_VERSION >= 35327"%s() got multiple values for keyword argument '%U'", func_name, kw_name);5328#else5329"%s() got multiple values for keyword argument '%s'", func_name,5330PyString_AsString(kw_name));5331#endif5332}53335334/* ParseKeywords */5335static int __Pyx_ParseOptionalKeywords(5336PyObject *kwds,5337PyObject **argnames[],5338PyObject *kwds2,5339PyObject *values[],5340Py_ssize_t num_pos_args,5341const char* function_name)5342{5343PyObject *key = 0, *value = 0;5344Py_ssize_t pos = 0;5345PyObject*** name;5346PyObject*** first_kw_arg = argnames + num_pos_args;5347while (PyDict_Next(kwds, &pos, &key, &value)) {5348name = first_kw_arg;5349while (*name && (**name != key)) name++;5350if (*name) {5351values[name-argnames] = value;5352continue;5353}5354name = first_kw_arg;5355#if PY_MAJOR_VERSION < 35356if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {5357while (*name) {5358if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))5359&& _PyString_Eq(**name, key)) {5360values[name-argnames] = value;5361break;5362}5363name++;5364}5365if (*name) continue;5366else {5367PyObject*** argname = argnames;5368while (argname != first_kw_arg) {5369if ((**argname == key) || (5370(CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))5371&& _PyString_Eq(**argname, key))) {5372goto arg_passed_twice;5373}5374argname++;5375}5376}5377} else5378#endif5379if (likely(PyUnicode_Check(key))) {5380while (*name) {5381int cmp = (**name == key) ? 0 :5382#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 35383(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :5384#endif5385PyUnicode_Compare(**name, key);5386if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;5387if (cmp == 0) {5388values[name-argnames] = value;5389break;5390}5391name++;5392}5393if (*name) continue;5394else {5395PyObject*** argname = argnames;5396while (argname != first_kw_arg) {5397int cmp = (**argname == key) ? 0 :5398#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 35399(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :5400#endif5401PyUnicode_Compare(**argname, key);5402if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;5403if (cmp == 0) goto arg_passed_twice;5404argname++;5405}5406}5407} else5408goto invalid_keyword_type;5409if (kwds2) {5410if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;5411} else {5412goto invalid_keyword;5413}5414}5415return 0;5416arg_passed_twice:5417__Pyx_RaiseDoubleKeywordsError(function_name, key);5418goto bad;5419invalid_keyword_type:5420PyErr_Format(PyExc_TypeError,5421"%.200s() keywords must be strings", function_name);5422goto bad;5423invalid_keyword:5424PyErr_Format(PyExc_TypeError,5425#if PY_MAJOR_VERSION < 35426"%.200s() got an unexpected keyword argument '%.200s'",5427function_name, PyString_AsString(key));5428#else5429"%s() got an unexpected keyword argument '%U'",5430function_name, key);5431#endif5432bad:5433return -1;5434}54355436/* ArgTypeTest */5437static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)5438{5439if (unlikely(!type)) {5440PyErr_SetString(PyExc_SystemError, "Missing type object");5441return 0;5442}5443else if (exact) {5444#if PY_MAJOR_VERSION == 25445if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;5446#endif5447}5448else {5449if (likely(__Pyx_TypeCheck(obj, type))) return 1;5450}5451PyErr_Format(PyExc_TypeError,5452"Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",5453name, type->tp_name, Py_TYPE(obj)->tp_name);5454return 0;5455}54565457/* IsLittleEndian */5458static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)5459{5460union {5461uint32_t u32;5462uint8_t u8[4];5463} S;5464S.u32 = 0x01020304;5465return S.u8[0] == 4;5466}54675468/* BufferFormatCheck */5469static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,5470__Pyx_BufFmt_StackElem* stack,5471__Pyx_TypeInfo* type) {5472stack[0].field = &ctx->root;5473stack[0].parent_offset = 0;5474ctx->root.type = type;5475ctx->root.name = "buffer dtype";5476ctx->root.offset = 0;5477ctx->head = stack;5478ctx->head->field = &ctx->root;5479ctx->fmt_offset = 0;5480ctx->head->parent_offset = 0;5481ctx->new_packmode = '@';5482ctx->enc_packmode = '@';5483ctx->new_count = 1;5484ctx->enc_count = 0;5485ctx->enc_type = 0;5486ctx->is_complex = 0;5487ctx->is_valid_array = 0;5488ctx->struct_alignment = 0;5489while (type->typegroup == 'S') {5490++ctx->head;5491ctx->head->field = type->fields;5492ctx->head->parent_offset = 0;5493type = type->fields->type;5494}5495}5496static int __Pyx_BufFmt_ParseNumber(const char** ts) {5497int count;5498const char* t = *ts;5499if (*t < '0' || *t > '9') {5500return -1;5501} else {5502count = *t++ - '0';5503while (*t >= '0' && *t <= '9') {5504count *= 10;5505count += *t++ - '0';5506}5507}5508*ts = t;5509return count;5510}5511static int __Pyx_BufFmt_ExpectNumber(const char **ts) {5512int number = __Pyx_BufFmt_ParseNumber(ts);5513if (number == -1)5514PyErr_Format(PyExc_ValueError,\5515"Does not understand character buffer dtype format string ('%c')", **ts);5516return number;5517}5518static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {5519PyErr_Format(PyExc_ValueError,5520"Unexpected format string character: '%c'", ch);5521}5522static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {5523switch (ch) {5524case '?': return "'bool'";5525case 'c': return "'char'";5526case 'b': return "'signed char'";5527case 'B': return "'unsigned char'";5528case 'h': return "'short'";5529case 'H': return "'unsigned short'";5530case 'i': return "'int'";5531case 'I': return "'unsigned int'";5532case 'l': return "'long'";5533case 'L': return "'unsigned long'";5534case 'q': return "'long long'";5535case 'Q': return "'unsigned long long'";5536case 'f': return (is_complex ? "'complex float'" : "'float'");5537case 'd': return (is_complex ? "'complex double'" : "'double'");5538case 'g': return (is_complex ? "'complex long double'" : "'long double'");5539case 'T': return "a struct";5540case 'O': return "Python object";5541case 'P': return "a pointer";5542case 's': case 'p': return "a string";5543case 0: return "end";5544default: return "unparseable format string";5545}5546}5547static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {5548switch (ch) {5549case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;5550case 'h': case 'H': return 2;5551case 'i': case 'I': case 'l': case 'L': return 4;5552case 'q': case 'Q': return 8;5553case 'f': return (is_complex ? 8 : 4);5554case 'd': return (is_complex ? 16 : 8);5555case 'g': {5556PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");5557return 0;5558}5559case 'O': case 'P': return sizeof(void*);5560default:5561__Pyx_BufFmt_RaiseUnexpectedChar(ch);5562return 0;5563}5564}5565static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {5566switch (ch) {5567case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;5568case 'h': case 'H': return sizeof(short);5569case 'i': case 'I': return sizeof(int);5570case 'l': case 'L': return sizeof(long);5571#ifdef HAVE_LONG_LONG5572case 'q': case 'Q': return sizeof(PY_LONG_LONG);5573#endif5574case 'f': return sizeof(float) * (is_complex ? 2 : 1);5575case 'd': return sizeof(double) * (is_complex ? 2 : 1);5576case 'g': return sizeof(long double) * (is_complex ? 2 : 1);5577case 'O': case 'P': return sizeof(void*);5578default: {5579__Pyx_BufFmt_RaiseUnexpectedChar(ch);5580return 0;5581}5582}5583}5584typedef struct { char c; short x; } __Pyx_st_short;5585typedef struct { char c; int x; } __Pyx_st_int;5586typedef struct { char c; long x; } __Pyx_st_long;5587typedef struct { char c; float x; } __Pyx_st_float;5588typedef struct { char c; double x; } __Pyx_st_double;5589typedef struct { char c; long double x; } __Pyx_st_longdouble;5590typedef struct { char c; void *x; } __Pyx_st_void_p;5591#ifdef HAVE_LONG_LONG5592typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;5593#endif5594static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {5595switch (ch) {5596case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;5597case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);5598case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);5599case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);5600#ifdef HAVE_LONG_LONG5601case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);5602#endif5603case 'f': return sizeof(__Pyx_st_float) - sizeof(float);5604case 'd': return sizeof(__Pyx_st_double) - sizeof(double);5605case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);5606case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);5607default:5608__Pyx_BufFmt_RaiseUnexpectedChar(ch);5609return 0;5610}5611}5612/* These are for computing the padding at the end of the struct to align5613on the first member of the struct. This will probably the same as above,5614but we don't have any guarantees.5615*/5616typedef struct { short x; char c; } __Pyx_pad_short;5617typedef struct { int x; char c; } __Pyx_pad_int;5618typedef struct { long x; char c; } __Pyx_pad_long;5619typedef struct { float x; char c; } __Pyx_pad_float;5620typedef struct { double x; char c; } __Pyx_pad_double;5621typedef struct { long double x; char c; } __Pyx_pad_longdouble;5622typedef struct { void *x; char c; } __Pyx_pad_void_p;5623#ifdef HAVE_LONG_LONG5624typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;5625#endif5626static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {5627switch (ch) {5628case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;5629case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);5630case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);5631case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);5632#ifdef HAVE_LONG_LONG5633case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);5634#endif5635case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);5636case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);5637case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);5638case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);5639default:5640__Pyx_BufFmt_RaiseUnexpectedChar(ch);5641return 0;5642}5643}5644static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {5645switch (ch) {5646case 'c':5647return 'H';5648case 'b': case 'h': case 'i':5649case 'l': case 'q': case 's': case 'p':5650return 'I';5651case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':5652return 'U';5653case 'f': case 'd': case 'g':5654return (is_complex ? 'C' : 'R');5655case 'O':5656return 'O';5657case 'P':5658return 'P';5659default: {5660__Pyx_BufFmt_RaiseUnexpectedChar(ch);5661return 0;5662}5663}5664}5665static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {5666if (ctx->head == NULL || ctx->head->field == &ctx->root) {5667const char* expected;5668const char* quote;5669if (ctx->head == NULL) {5670expected = "end";5671quote = "";5672} else {5673expected = ctx->head->field->type->name;5674quote = "'";5675}5676PyErr_Format(PyExc_ValueError,5677"Buffer dtype mismatch, expected %s%s%s but got %s",5678quote, expected, quote,5679__Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));5680} else {5681__Pyx_StructField* field = ctx->head->field;5682__Pyx_StructField* parent = (ctx->head - 1)->field;5683PyErr_Format(PyExc_ValueError,5684"Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",5685field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),5686parent->type->name, field->name);5687}5688}5689static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {5690char group;5691size_t size, offset, arraysize = 1;5692if (ctx->enc_type == 0) return 0;5693if (ctx->head->field->type->arraysize[0]) {5694int i, ndim = 0;5695if (ctx->enc_type == 's' || ctx->enc_type == 'p') {5696ctx->is_valid_array = ctx->head->field->type->ndim == 1;5697ndim = 1;5698if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {5699PyErr_Format(PyExc_ValueError,5700"Expected a dimension of size %zu, got %zu",5701ctx->head->field->type->arraysize[0], ctx->enc_count);5702return -1;5703}5704}5705if (!ctx->is_valid_array) {5706PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",5707ctx->head->field->type->ndim, ndim);5708return -1;5709}5710for (i = 0; i < ctx->head->field->type->ndim; i++) {5711arraysize *= ctx->head->field->type->arraysize[i];5712}5713ctx->is_valid_array = 0;5714ctx->enc_count = 1;5715}5716group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);5717do {5718__Pyx_StructField* field = ctx->head->field;5719__Pyx_TypeInfo* type = field->type;5720if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {5721size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);5722} else {5723size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);5724}5725if (ctx->enc_packmode == '@') {5726size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);5727size_t align_mod_offset;5728if (align_at == 0) return -1;5729align_mod_offset = ctx->fmt_offset % align_at;5730if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;5731if (ctx->struct_alignment == 0)5732ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,5733ctx->is_complex);5734}5735if (type->size != size || type->typegroup != group) {5736if (type->typegroup == 'C' && type->fields != NULL) {5737size_t parent_offset = ctx->head->parent_offset + field->offset;5738++ctx->head;5739ctx->head->field = type->fields;5740ctx->head->parent_offset = parent_offset;5741continue;5742}5743if ((type->typegroup == 'H' || group == 'H') && type->size == size) {5744} else {5745__Pyx_BufFmt_RaiseExpected(ctx);5746return -1;5747}5748}5749offset = ctx->head->parent_offset + field->offset;5750if (ctx->fmt_offset != offset) {5751PyErr_Format(PyExc_ValueError,5752"Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",5753(Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);5754return -1;5755}5756ctx->fmt_offset += size;5757if (arraysize)5758ctx->fmt_offset += (arraysize - 1) * size;5759--ctx->enc_count;5760while (1) {5761if (field == &ctx->root) {5762ctx->head = NULL;5763if (ctx->enc_count != 0) {5764__Pyx_BufFmt_RaiseExpected(ctx);5765return -1;5766}5767break;5768}5769ctx->head->field = ++field;5770if (field->type == NULL) {5771--ctx->head;5772field = ctx->head->field;5773continue;5774} else if (field->type->typegroup == 'S') {5775size_t parent_offset = ctx->head->parent_offset + field->offset;5776if (field->type->fields->type == NULL) continue;5777field = field->type->fields;5778++ctx->head;5779ctx->head->field = field;5780ctx->head->parent_offset = parent_offset;5781break;5782} else {5783break;5784}5785}5786} while (ctx->enc_count);5787ctx->enc_type = 0;5788ctx->is_complex = 0;5789return 0;5790}5791static PyObject *5792__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)5793{5794const char *ts = *tsp;5795int i = 0, number;5796int ndim = ctx->head->field->type->ndim;5797;5798++ts;5799if (ctx->new_count != 1) {5800PyErr_SetString(PyExc_ValueError,5801"Cannot handle repeated arrays in format string");5802return NULL;5803}5804if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;5805while (*ts && *ts != ')') {5806switch (*ts) {5807case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue;5808default: break;5809}5810number = __Pyx_BufFmt_ExpectNumber(&ts);5811if (number == -1) return NULL;5812if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])5813return PyErr_Format(PyExc_ValueError,5814"Expected a dimension of size %zu, got %d",5815ctx->head->field->type->arraysize[i], number);5816if (*ts != ',' && *ts != ')')5817return PyErr_Format(PyExc_ValueError,5818"Expected a comma in format string, got '%c'", *ts);5819if (*ts == ',') ts++;5820i++;5821}5822if (i != ndim)5823return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",5824ctx->head->field->type->ndim, i);5825if (!*ts) {5826PyErr_SetString(PyExc_ValueError,5827"Unexpected end of format string, expected ')'");5828return NULL;5829}5830ctx->is_valid_array = 1;5831ctx->new_count = 1;5832*tsp = ++ts;5833return Py_None;5834}5835static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {5836int got_Z = 0;5837while (1) {5838switch(*ts) {5839case 0:5840if (ctx->enc_type != 0 && ctx->head == NULL) {5841__Pyx_BufFmt_RaiseExpected(ctx);5842return NULL;5843}5844if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;5845if (ctx->head != NULL) {5846__Pyx_BufFmt_RaiseExpected(ctx);5847return NULL;5848}5849return ts;5850case ' ':5851case '\r':5852case '\n':5853++ts;5854break;5855case '<':5856if (!__Pyx_Is_Little_Endian()) {5857PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");5858return NULL;5859}5860ctx->new_packmode = '=';5861++ts;5862break;5863case '>':5864case '!':5865if (__Pyx_Is_Little_Endian()) {5866PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");5867return NULL;5868}5869ctx->new_packmode = '=';5870++ts;5871break;5872case '=':5873case '@':5874case '^':5875ctx->new_packmode = *ts++;5876break;5877case 'T':5878{5879const char* ts_after_sub;5880size_t i, struct_count = ctx->new_count;5881size_t struct_alignment = ctx->struct_alignment;5882ctx->new_count = 1;5883++ts;5884if (*ts != '{') {5885PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");5886return NULL;5887}5888if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;5889ctx->enc_type = 0;5890ctx->enc_count = 0;5891ctx->struct_alignment = 0;5892++ts;5893ts_after_sub = ts;5894for (i = 0; i != struct_count; ++i) {5895ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);5896if (!ts_after_sub) return NULL;5897}5898ts = ts_after_sub;5899if (struct_alignment) ctx->struct_alignment = struct_alignment;5900}5901break;5902case '}':5903{5904size_t alignment = ctx->struct_alignment;5905++ts;5906if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;5907ctx->enc_type = 0;5908if (alignment && ctx->fmt_offset % alignment) {5909ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);5910}5911}5912return ts;5913case 'x':5914if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;5915ctx->fmt_offset += ctx->new_count;5916ctx->new_count = 1;5917ctx->enc_count = 0;5918ctx->enc_type = 0;5919ctx->enc_packmode = ctx->new_packmode;5920++ts;5921break;5922case 'Z':5923got_Z = 1;5924++ts;5925if (*ts != 'f' && *ts != 'd' && *ts != 'g') {5926__Pyx_BufFmt_RaiseUnexpectedChar('Z');5927return NULL;5928}5929CYTHON_FALLTHROUGH;5930case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':5931case 'l': case 'L': case 'q': case 'Q':5932case 'f': case 'd': case 'g':5933case 'O': case 'p':5934if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&5935ctx->enc_packmode == ctx->new_packmode) {5936ctx->enc_count += ctx->new_count;5937ctx->new_count = 1;5938got_Z = 0;5939++ts;5940break;5941}5942CYTHON_FALLTHROUGH;5943case 's':5944if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;5945ctx->enc_count = ctx->new_count;5946ctx->enc_packmode = ctx->new_packmode;5947ctx->enc_type = *ts;5948ctx->is_complex = got_Z;5949++ts;5950ctx->new_count = 1;5951got_Z = 0;5952break;5953case ':':5954++ts;5955while(*ts != ':') ++ts;5956++ts;5957break;5958case '(':5959if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;5960break;5961default:5962{5963int number = __Pyx_BufFmt_ExpectNumber(&ts);5964if (number == -1) return NULL;5965ctx->new_count = (size_t)number;5966}5967}5968}5969}59705971/* BufferGetAndValidate */5972static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {5973if (unlikely(info->buf == NULL)) return;5974if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;5975__Pyx_ReleaseBuffer(info);5976}5977static void __Pyx_ZeroBuffer(Py_buffer* buf) {5978buf->buf = NULL;5979buf->obj = NULL;5980buf->strides = __Pyx_zeros;5981buf->shape = __Pyx_zeros;5982buf->suboffsets = __Pyx_minusones;5983}5984static int __Pyx__GetBufferAndValidate(5985Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags,5986int nd, int cast, __Pyx_BufFmt_StackElem* stack)5987{5988buf->buf = NULL;5989if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) {5990__Pyx_ZeroBuffer(buf);5991return -1;5992}5993if (unlikely(buf->ndim != nd)) {5994PyErr_Format(PyExc_ValueError,5995"Buffer has wrong number of dimensions (expected %d, got %d)",5996nd, buf->ndim);5997goto fail;5998}5999if (!cast) {6000__Pyx_BufFmt_Context ctx;6001__Pyx_BufFmt_Init(&ctx, stack, dtype);6002if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;6003}6004if (unlikely((size_t)buf->itemsize != dtype->size)) {6005PyErr_Format(PyExc_ValueError,6006"Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",6007buf->itemsize, (buf->itemsize > 1) ? "s" : "",6008dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");6009goto fail;6010}6011if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;6012return 0;6013fail:;6014__Pyx_SafeReleaseBuffer(buf);6015return -1;6016}60176018/* PyObjectGetAttrStr */6019#if CYTHON_USE_TYPE_SLOTS6020static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {6021PyTypeObject* tp = Py_TYPE(obj);6022if (likely(tp->tp_getattro))6023return tp->tp_getattro(obj, attr_name);6024#if PY_MAJOR_VERSION < 36025if (likely(tp->tp_getattr))6026return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));6027#endif6028return PyObject_GetAttr(obj, attr_name);6029}6030#endif60316032/* GetBuiltinName */6033static PyObject *__Pyx_GetBuiltinName(PyObject *name) {6034PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);6035if (unlikely(!result)) {6036PyErr_Format(PyExc_NameError,6037#if PY_MAJOR_VERSION >= 36038"name '%U' is not defined", name);6039#else6040"name '%.200s' is not defined", PyString_AS_STRING(name));6041#endif6042}6043return result;6044}60456046/* PyDictVersioning */6047#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS6048static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {6049PyObject *dict = Py_TYPE(obj)->tp_dict;6050return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;6051}6052static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {6053PyObject **dictptr = NULL;6054Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;6055if (offset) {6056#if CYTHON_COMPILING_IN_CPYTHON6057dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);6058#else6059dictptr = _PyObject_GetDictPtr(obj);6060#endif6061}6062return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;6063}6064static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {6065PyObject *dict = Py_TYPE(obj)->tp_dict;6066if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))6067return 0;6068return obj_dict_version == __Pyx_get_object_dict_version(obj);6069}6070#endif60716072/* GetModuleGlobalName */6073#if CYTHON_USE_DICT_VERSIONS6074static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)6075#else6076static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)6077#endif6078{6079PyObject *result;6080#if !CYTHON_AVOID_BORROWED_REFS6081#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A16082result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);6083__PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)6084if (likely(result)) {6085return __Pyx_NewRef(result);6086} else if (unlikely(PyErr_Occurred())) {6087return NULL;6088}6089#else6090result = PyDict_GetItem(__pyx_d, name);6091__PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)6092if (likely(result)) {6093return __Pyx_NewRef(result);6094}6095#endif6096#else6097result = PyObject_GetItem(__pyx_d, name);6098__PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)6099if (likely(result)) {6100return __Pyx_NewRef(result);6101}6102PyErr_Clear();6103#endif6104return __Pyx_GetBuiltinName(name);6105}61066107/* PyObjectCall */6108#if CYTHON_COMPILING_IN_CPYTHON6109static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {6110PyObject *result;6111ternaryfunc call = func->ob_type->tp_call;6112if (unlikely(!call))6113return PyObject_Call(func, arg, kw);6114if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))6115return NULL;6116result = (*call)(func, arg, kw);6117Py_LeaveRecursiveCall();6118if (unlikely(!result) && unlikely(!PyErr_Occurred())) {6119PyErr_SetString(6120PyExc_SystemError,6121"NULL result without error in PyObject_Call");6122}6123return result;6124}6125#endif61266127/* ExtTypeTest */6128static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {6129if (unlikely(!type)) {6130PyErr_SetString(PyExc_SystemError, "Missing type object");6131return 0;6132}6133if (likely(__Pyx_TypeCheck(obj, type)))6134return 1;6135PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",6136Py_TYPE(obj)->tp_name, type->tp_name);6137return 0;6138}61396140/* GetItemInt */6141static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {6142PyObject *r;6143if (!j) return NULL;6144r = PyObject_GetItem(o, j);6145Py_DECREF(j);6146return r;6147}6148static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,6149CYTHON_NCP_UNUSED int wraparound,6150CYTHON_NCP_UNUSED int boundscheck) {6151#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS6152Py_ssize_t wrapped_i = i;6153if (wraparound & unlikely(i < 0)) {6154wrapped_i += PyList_GET_SIZE(o);6155}6156if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {6157PyObject *r = PyList_GET_ITEM(o, wrapped_i);6158Py_INCREF(r);6159return r;6160}6161return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));6162#else6163return PySequence_GetItem(o, i);6164#endif6165}6166static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,6167CYTHON_NCP_UNUSED int wraparound,6168CYTHON_NCP_UNUSED int boundscheck) {6169#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS6170Py_ssize_t wrapped_i = i;6171if (wraparound & unlikely(i < 0)) {6172wrapped_i += PyTuple_GET_SIZE(o);6173}6174if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {6175PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);6176Py_INCREF(r);6177return r;6178}6179return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));6180#else6181return PySequence_GetItem(o, i);6182#endif6183}6184static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,6185CYTHON_NCP_UNUSED int wraparound,6186CYTHON_NCP_UNUSED int boundscheck) {6187#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS6188if (is_list || PyList_CheckExact(o)) {6189Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);6190if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {6191PyObject *r = PyList_GET_ITEM(o, n);6192Py_INCREF(r);6193return r;6194}6195}6196else if (PyTuple_CheckExact(o)) {6197Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);6198if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {6199PyObject *r = PyTuple_GET_ITEM(o, n);6200Py_INCREF(r);6201return r;6202}6203} else {6204PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;6205if (likely(m && m->sq_item)) {6206if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {6207Py_ssize_t l = m->sq_length(o);6208if (likely(l >= 0)) {6209i += l;6210} else {6211if (!PyErr_ExceptionMatches(PyExc_OverflowError))6212return NULL;6213PyErr_Clear();6214}6215}6216return m->sq_item(o, i);6217}6218}6219#else6220if (is_list || PySequence_Check(o)) {6221return PySequence_GetItem(o, i);6222}6223#endif6224return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));6225}62266227/* ObjectGetItem */6228#if CYTHON_USE_TYPE_SLOTS6229static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {6230PyObject *runerr;6231Py_ssize_t key_value;6232PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;6233if (unlikely(!(m && m->sq_item))) {6234PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);6235return NULL;6236}6237key_value = __Pyx_PyIndex_AsSsize_t(index);6238if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {6239return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);6240}6241if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {6242PyErr_Clear();6243PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);6244}6245return NULL;6246}6247static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {6248PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;6249if (likely(m && m->mp_subscript)) {6250return m->mp_subscript(obj, key);6251}6252return __Pyx_PyObject_GetIndex(obj, key);6253}6254#endif62556256/* PyFunctionFastCall */6257#if CYTHON_FAST_PYCALL6258static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,6259PyObject *globals) {6260PyFrameObject *f;6261PyThreadState *tstate = __Pyx_PyThreadState_Current;6262PyObject **fastlocals;6263Py_ssize_t i;6264PyObject *result;6265assert(globals != NULL);6266/* XXX Perhaps we should create a specialized6267PyFrame_New() that doesn't take locals, but does6268take builtins without sanity checking them.6269*/6270assert(tstate != NULL);6271f = PyFrame_New(tstate, co, globals, NULL);6272if (f == NULL) {6273return NULL;6274}6275fastlocals = __Pyx_PyFrame_GetLocalsplus(f);6276for (i = 0; i < na; i++) {6277Py_INCREF(*args);6278fastlocals[i] = *args++;6279}6280result = PyEval_EvalFrameEx(f,0);6281++tstate->recursion_depth;6282Py_DECREF(f);6283--tstate->recursion_depth;6284return result;6285}6286#if 1 || PY_VERSION_HEX < 0x030600B16287static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {6288PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);6289PyObject *globals = PyFunction_GET_GLOBALS(func);6290PyObject *argdefs = PyFunction_GET_DEFAULTS(func);6291PyObject *closure;6292#if PY_MAJOR_VERSION >= 36293PyObject *kwdefs;6294#endif6295PyObject *kwtuple, **k;6296PyObject **d;6297Py_ssize_t nd;6298Py_ssize_t nk;6299PyObject *result;6300assert(kwargs == NULL || PyDict_Check(kwargs));6301nk = kwargs ? PyDict_Size(kwargs) : 0;6302if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {6303return NULL;6304}6305if (6306#if PY_MAJOR_VERSION >= 36307co->co_kwonlyargcount == 0 &&6308#endif6309likely(kwargs == NULL || nk == 0) &&6310co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {6311if (argdefs == NULL && co->co_argcount == nargs) {6312result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);6313goto done;6314}6315else if (nargs == 0 && argdefs != NULL6316&& co->co_argcount == Py_SIZE(argdefs)) {6317/* function called with no arguments, but all parameters have6318a default value: use default values as arguments .*/6319args = &PyTuple_GET_ITEM(argdefs, 0);6320result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);6321goto done;6322}6323}6324if (kwargs != NULL) {6325Py_ssize_t pos, i;6326kwtuple = PyTuple_New(2 * nk);6327if (kwtuple == NULL) {6328result = NULL;6329goto done;6330}6331k = &PyTuple_GET_ITEM(kwtuple, 0);6332pos = i = 0;6333while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {6334Py_INCREF(k[i]);6335Py_INCREF(k[i+1]);6336i += 2;6337}6338nk = i / 2;6339}6340else {6341kwtuple = NULL;6342k = NULL;6343}6344closure = PyFunction_GET_CLOSURE(func);6345#if PY_MAJOR_VERSION >= 36346kwdefs = PyFunction_GET_KW_DEFAULTS(func);6347#endif6348if (argdefs != NULL) {6349d = &PyTuple_GET_ITEM(argdefs, 0);6350nd = Py_SIZE(argdefs);6351}6352else {6353d = NULL;6354nd = 0;6355}6356#if PY_MAJOR_VERSION >= 36357result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,6358args, (int)nargs,6359k, (int)nk,6360d, (int)nd, kwdefs, closure);6361#else6362result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,6363args, (int)nargs,6364k, (int)nk,6365d, (int)nd, closure);6366#endif6367Py_XDECREF(kwtuple);6368done:6369Py_LeaveRecursiveCall();6370return result;6371}6372#endif6373#endif63746375/* PyObjectCallMethO */6376#if CYTHON_COMPILING_IN_CPYTHON6377static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {6378PyObject *self, *result;6379PyCFunction cfunc;6380cfunc = PyCFunction_GET_FUNCTION(func);6381self = PyCFunction_GET_SELF(func);6382if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))6383return NULL;6384result = cfunc(self, arg);6385Py_LeaveRecursiveCall();6386if (unlikely(!result) && unlikely(!PyErr_Occurred())) {6387PyErr_SetString(6388PyExc_SystemError,6389"NULL result without error in PyObject_Call");6390}6391return result;6392}6393#endif63946395/* PyObjectCallNoArg */6396#if CYTHON_COMPILING_IN_CPYTHON6397static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {6398#if CYTHON_FAST_PYCALL6399if (PyFunction_Check(func)) {6400return __Pyx_PyFunction_FastCall(func, NULL, 0);6401}6402#endif6403#ifdef __Pyx_CyFunction_USED6404if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))6405#else6406if (likely(PyCFunction_Check(func)))6407#endif6408{6409if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {6410return __Pyx_PyObject_CallMethO(func, NULL);6411}6412}6413return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);6414}6415#endif64166417/* PyCFunctionFastCall */6418#if CYTHON_FAST_PYCCALL6419static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {6420PyCFunctionObject *func = (PyCFunctionObject*)func_obj;6421PyCFunction meth = PyCFunction_GET_FUNCTION(func);6422PyObject *self = PyCFunction_GET_SELF(func);6423int flags = PyCFunction_GET_FLAGS(func);6424assert(PyCFunction_Check(func));6425assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));6426assert(nargs >= 0);6427assert(nargs == 0 || args != NULL);6428/* _PyCFunction_FastCallDict() must not be called with an exception set,6429because it may clear it (directly or indirectly) and so the6430caller loses its exception */6431assert(!PyErr_Occurred());6432if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {6433return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);6434} else {6435return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);6436}6437}6438#endif64396440/* PyObjectCallOneArg */6441#if CYTHON_COMPILING_IN_CPYTHON6442static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {6443PyObject *result;6444PyObject *args = PyTuple_New(1);6445if (unlikely(!args)) return NULL;6446Py_INCREF(arg);6447PyTuple_SET_ITEM(args, 0, arg);6448result = __Pyx_PyObject_Call(func, args, NULL);6449Py_DECREF(args);6450return result;6451}6452static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {6453#if CYTHON_FAST_PYCALL6454if (PyFunction_Check(func)) {6455return __Pyx_PyFunction_FastCall(func, &arg, 1);6456}6457#endif6458if (likely(PyCFunction_Check(func))) {6459if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {6460return __Pyx_PyObject_CallMethO(func, arg);6461#if CYTHON_FAST_PYCCALL6462} else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {6463return __Pyx_PyCFunction_FastCall(func, &arg, 1);6464#endif6465}6466}6467return __Pyx__PyObject_CallOneArg(func, arg);6468}6469#else6470static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {6471PyObject *result;6472PyObject *args = PyTuple_Pack(1, arg);6473if (unlikely(!args)) return NULL;6474result = __Pyx_PyObject_Call(func, args, NULL);6475Py_DECREF(args);6476return result;6477}6478#endif64796480/* BufferIndexError */6481static void __Pyx_RaiseBufferIndexError(int axis) {6482PyErr_Format(PyExc_IndexError,6483"Out of bounds on buffer access (axis %d)", axis);6484}64856486/* BufferFallbackError */6487static void __Pyx_RaiseBufferFallbackError(void) {6488PyErr_SetString(PyExc_ValueError,6489"Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");6490}64916492/* PyErrFetchRestore */6493#if CYTHON_FAST_THREAD_STATE6494static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {6495PyObject *tmp_type, *tmp_value, *tmp_tb;6496tmp_type = tstate->curexc_type;6497tmp_value = tstate->curexc_value;6498tmp_tb = tstate->curexc_traceback;6499tstate->curexc_type = type;6500tstate->curexc_value = value;6501tstate->curexc_traceback = tb;6502Py_XDECREF(tmp_type);6503Py_XDECREF(tmp_value);6504Py_XDECREF(tmp_tb);6505}6506static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {6507*type = tstate->curexc_type;6508*value = tstate->curexc_value;6509*tb = tstate->curexc_traceback;6510tstate->curexc_type = 0;6511tstate->curexc_value = 0;6512tstate->curexc_traceback = 0;6513}6514#endif65156516/* RaiseException */6517#if PY_MAJOR_VERSION < 36518static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,6519CYTHON_UNUSED PyObject *cause) {6520__Pyx_PyThreadState_declare6521Py_XINCREF(type);6522if (!value || value == Py_None)6523value = NULL;6524else6525Py_INCREF(value);6526if (!tb || tb == Py_None)6527tb = NULL;6528else {6529Py_INCREF(tb);6530if (!PyTraceBack_Check(tb)) {6531PyErr_SetString(PyExc_TypeError,6532"raise: arg 3 must be a traceback or None");6533goto raise_error;6534}6535}6536if (PyType_Check(type)) {6537#if CYTHON_COMPILING_IN_PYPY6538if (!value) {6539Py_INCREF(Py_None);6540value = Py_None;6541}6542#endif6543PyErr_NormalizeException(&type, &value, &tb);6544} else {6545if (value) {6546PyErr_SetString(PyExc_TypeError,6547"instance exception may not have a separate value");6548goto raise_error;6549}6550value = type;6551type = (PyObject*) Py_TYPE(type);6552Py_INCREF(type);6553if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {6554PyErr_SetString(PyExc_TypeError,6555"raise: exception class must be a subclass of BaseException");6556goto raise_error;6557}6558}6559__Pyx_PyThreadState_assign6560__Pyx_ErrRestore(type, value, tb);6561return;6562raise_error:6563Py_XDECREF(value);6564Py_XDECREF(type);6565Py_XDECREF(tb);6566return;6567}6568#else6569static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {6570PyObject* owned_instance = NULL;6571if (tb == Py_None) {6572tb = 0;6573} else if (tb && !PyTraceBack_Check(tb)) {6574PyErr_SetString(PyExc_TypeError,6575"raise: arg 3 must be a traceback or None");6576goto bad;6577}6578if (value == Py_None)6579value = 0;6580if (PyExceptionInstance_Check(type)) {6581if (value) {6582PyErr_SetString(PyExc_TypeError,6583"instance exception may not have a separate value");6584goto bad;6585}6586value = type;6587type = (PyObject*) Py_TYPE(value);6588} else if (PyExceptionClass_Check(type)) {6589PyObject *instance_class = NULL;6590if (value && PyExceptionInstance_Check(value)) {6591instance_class = (PyObject*) Py_TYPE(value);6592if (instance_class != type) {6593int is_subclass = PyObject_IsSubclass(instance_class, type);6594if (!is_subclass) {6595instance_class = NULL;6596} else if (unlikely(is_subclass == -1)) {6597goto bad;6598} else {6599type = instance_class;6600}6601}6602}6603if (!instance_class) {6604PyObject *args;6605if (!value)6606args = PyTuple_New(0);6607else if (PyTuple_Check(value)) {6608Py_INCREF(value);6609args = value;6610} else6611args = PyTuple_Pack(1, value);6612if (!args)6613goto bad;6614owned_instance = PyObject_Call(type, args, NULL);6615Py_DECREF(args);6616if (!owned_instance)6617goto bad;6618value = owned_instance;6619if (!PyExceptionInstance_Check(value)) {6620PyErr_Format(PyExc_TypeError,6621"calling %R should have returned an instance of "6622"BaseException, not %R",6623type, Py_TYPE(value));6624goto bad;6625}6626}6627} else {6628PyErr_SetString(PyExc_TypeError,6629"raise: exception class must be a subclass of BaseException");6630goto bad;6631}6632if (cause) {6633PyObject *fixed_cause;6634if (cause == Py_None) {6635fixed_cause = NULL;6636} else if (PyExceptionClass_Check(cause)) {6637fixed_cause = PyObject_CallObject(cause, NULL);6638if (fixed_cause == NULL)6639goto bad;6640} else if (PyExceptionInstance_Check(cause)) {6641fixed_cause = cause;6642Py_INCREF(fixed_cause);6643} else {6644PyErr_SetString(PyExc_TypeError,6645"exception causes must derive from "6646"BaseException");6647goto bad;6648}6649PyException_SetCause(value, fixed_cause);6650}6651PyErr_SetObject(type, value);6652if (tb) {6653#if CYTHON_COMPILING_IN_PYPY6654PyObject *tmp_type, *tmp_value, *tmp_tb;6655PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);6656Py_INCREF(tb);6657PyErr_Restore(tmp_type, tmp_value, tb);6658Py_XDECREF(tmp_tb);6659#else6660PyThreadState *tstate = __Pyx_PyThreadState_Current;6661PyObject* tmp_tb = tstate->curexc_traceback;6662if (tb != tmp_tb) {6663Py_INCREF(tb);6664tstate->curexc_traceback = tb;6665Py_XDECREF(tmp_tb);6666}6667#endif6668}6669bad:6670Py_XDECREF(owned_instance);6671return;6672}6673#endif66746675/* DictGetItem */6676#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY6677static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {6678PyObject *value;6679value = PyDict_GetItemWithError(d, key);6680if (unlikely(!value)) {6681if (!PyErr_Occurred()) {6682if (unlikely(PyTuple_Check(key))) {6683PyObject* args = PyTuple_Pack(1, key);6684if (likely(args)) {6685PyErr_SetObject(PyExc_KeyError, args);6686Py_DECREF(args);6687}6688} else {6689PyErr_SetObject(PyExc_KeyError, key);6690}6691}6692return NULL;6693}6694Py_INCREF(value);6695return value;6696}6697#endif66986699/* RaiseTooManyValuesToUnpack */6700static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {6701PyErr_Format(PyExc_ValueError,6702"too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);6703}67046705/* RaiseNeedMoreValuesToUnpack */6706static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {6707PyErr_Format(PyExc_ValueError,6708"need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",6709index, (index == 1) ? "" : "s");6710}67116712/* RaiseNoneIterError */6713static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {6714PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");6715}67166717/* GetTopmostException */6718#if CYTHON_USE_EXC_INFO_STACK6719static _PyErr_StackItem *6720__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)6721{6722_PyErr_StackItem *exc_info = tstate->exc_info;6723while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&6724exc_info->previous_item != NULL)6725{6726exc_info = exc_info->previous_item;6727}6728return exc_info;6729}6730#endif67316732/* SaveResetException */6733#if CYTHON_FAST_THREAD_STATE6734static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {6735#if CYTHON_USE_EXC_INFO_STACK6736_PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);6737*type = exc_info->exc_type;6738*value = exc_info->exc_value;6739*tb = exc_info->exc_traceback;6740#else6741*type = tstate->exc_type;6742*value = tstate->exc_value;6743*tb = tstate->exc_traceback;6744#endif6745Py_XINCREF(*type);6746Py_XINCREF(*value);6747Py_XINCREF(*tb);6748}6749static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {6750PyObject *tmp_type, *tmp_value, *tmp_tb;6751#if CYTHON_USE_EXC_INFO_STACK6752_PyErr_StackItem *exc_info = tstate->exc_info;6753tmp_type = exc_info->exc_type;6754tmp_value = exc_info->exc_value;6755tmp_tb = exc_info->exc_traceback;6756exc_info->exc_type = type;6757exc_info->exc_value = value;6758exc_info->exc_traceback = tb;6759#else6760tmp_type = tstate->exc_type;6761tmp_value = tstate->exc_value;6762tmp_tb = tstate->exc_traceback;6763tstate->exc_type = type;6764tstate->exc_value = value;6765tstate->exc_traceback = tb;6766#endif6767Py_XDECREF(tmp_type);6768Py_XDECREF(tmp_value);6769Py_XDECREF(tmp_tb);6770}6771#endif67726773/* PyErrExceptionMatches */6774#if CYTHON_FAST_THREAD_STATE6775static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {6776Py_ssize_t i, n;6777n = PyTuple_GET_SIZE(tuple);6778#if PY_MAJOR_VERSION >= 36779for (i=0; i<n; i++) {6780if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;6781}6782#endif6783for (i=0; i<n; i++) {6784if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;6785}6786return 0;6787}6788static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {6789PyObject *exc_type = tstate->curexc_type;6790if (exc_type == err) return 1;6791if (unlikely(!exc_type)) return 0;6792if (unlikely(PyTuple_Check(err)))6793return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);6794return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);6795}6796#endif67976798/* GetException */6799#if CYTHON_FAST_THREAD_STATE6800static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)6801#else6802static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)6803#endif6804{6805PyObject *local_type, *local_value, *local_tb;6806#if CYTHON_FAST_THREAD_STATE6807PyObject *tmp_type, *tmp_value, *tmp_tb;6808local_type = tstate->curexc_type;6809local_value = tstate->curexc_value;6810local_tb = tstate->curexc_traceback;6811tstate->curexc_type = 0;6812tstate->curexc_value = 0;6813tstate->curexc_traceback = 0;6814#else6815PyErr_Fetch(&local_type, &local_value, &local_tb);6816#endif6817PyErr_NormalizeException(&local_type, &local_value, &local_tb);6818#if CYTHON_FAST_THREAD_STATE6819if (unlikely(tstate->curexc_type))6820#else6821if (unlikely(PyErr_Occurred()))6822#endif6823goto bad;6824#if PY_MAJOR_VERSION >= 36825if (local_tb) {6826if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))6827goto bad;6828}6829#endif6830Py_XINCREF(local_tb);6831Py_XINCREF(local_type);6832Py_XINCREF(local_value);6833*type = local_type;6834*value = local_value;6835*tb = local_tb;6836#if CYTHON_FAST_THREAD_STATE6837#if CYTHON_USE_EXC_INFO_STACK6838{6839_PyErr_StackItem *exc_info = tstate->exc_info;6840tmp_type = exc_info->exc_type;6841tmp_value = exc_info->exc_value;6842tmp_tb = exc_info->exc_traceback;6843exc_info->exc_type = local_type;6844exc_info->exc_value = local_value;6845exc_info->exc_traceback = local_tb;6846}6847#else6848tmp_type = tstate->exc_type;6849tmp_value = tstate->exc_value;6850tmp_tb = tstate->exc_traceback;6851tstate->exc_type = local_type;6852tstate->exc_value = local_value;6853tstate->exc_traceback = local_tb;6854#endif6855Py_XDECREF(tmp_type);6856Py_XDECREF(tmp_value);6857Py_XDECREF(tmp_tb);6858#else6859PyErr_SetExcInfo(local_type, local_value, local_tb);6860#endif6861return 0;6862bad:6863*type = 0;6864*value = 0;6865*tb = 0;6866Py_XDECREF(local_type);6867Py_XDECREF(local_value);6868Py_XDECREF(local_tb);6869return -1;6870}68716872/* TypeImport */6873#ifndef __PYX_HAVE_RT_ImportType6874#define __PYX_HAVE_RT_ImportType6875static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,6876size_t size, enum __Pyx_ImportType_CheckSize check_size)6877{6878PyObject *result = 0;6879char warning[200];6880Py_ssize_t basicsize;6881#ifdef Py_LIMITED_API6882PyObject *py_basicsize;6883#endif6884result = PyObject_GetAttrString(module, class_name);6885if (!result)6886goto bad;6887if (!PyType_Check(result)) {6888PyErr_Format(PyExc_TypeError,6889"%.200s.%.200s is not a type object",6890module_name, class_name);6891goto bad;6892}6893#ifndef Py_LIMITED_API6894basicsize = ((PyTypeObject *)result)->tp_basicsize;6895#else6896py_basicsize = PyObject_GetAttrString(result, "__basicsize__");6897if (!py_basicsize)6898goto bad;6899basicsize = PyLong_AsSsize_t(py_basicsize);6900Py_DECREF(py_basicsize);6901py_basicsize = 0;6902if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())6903goto bad;6904#endif6905if ((size_t)basicsize < size) {6906PyErr_Format(PyExc_ValueError,6907"%.200s.%.200s size changed, may indicate binary incompatibility. "6908"Expected %zd from C header, got %zd from PyObject",6909module_name, class_name, size, basicsize);6910goto bad;6911}6912if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {6913PyErr_Format(PyExc_ValueError,6914"%.200s.%.200s size changed, may indicate binary incompatibility. "6915"Expected %zd from C header, got %zd from PyObject",6916module_name, class_name, size, basicsize);6917goto bad;6918}6919else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {6920PyOS_snprintf(warning, sizeof(warning),6921"%s.%s size changed, may indicate binary incompatibility. "6922"Expected %zd from C header, got %zd from PyObject",6923module_name, class_name, size, basicsize);6924if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;6925}6926return (PyTypeObject *)result;6927bad:6928Py_XDECREF(result);6929return NULL;6930}6931#endif69326933/* Import */6934static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {6935PyObject *empty_list = 0;6936PyObject *module = 0;6937PyObject *global_dict = 0;6938PyObject *empty_dict = 0;6939PyObject *list;6940#if PY_MAJOR_VERSION < 36941PyObject *py_import;6942py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);6943if (!py_import)6944goto bad;6945#endif6946if (from_list)6947list = from_list;6948else {6949empty_list = PyList_New(0);6950if (!empty_list)6951goto bad;6952list = empty_list;6953}6954global_dict = PyModule_GetDict(__pyx_m);6955if (!global_dict)6956goto bad;6957empty_dict = PyDict_New();6958if (!empty_dict)6959goto bad;6960{6961#if PY_MAJOR_VERSION >= 36962if (level == -1) {6963if (strchr(__Pyx_MODULE_NAME, '.')) {6964module = PyImport_ImportModuleLevelObject(6965name, global_dict, empty_dict, list, 1);6966if (!module) {6967if (!PyErr_ExceptionMatches(PyExc_ImportError))6968goto bad;6969PyErr_Clear();6970}6971}6972level = 0;6973}6974#endif6975if (!module) {6976#if PY_MAJOR_VERSION < 36977PyObject *py_level = PyInt_FromLong(level);6978if (!py_level)6979goto bad;6980module = PyObject_CallFunctionObjArgs(py_import,6981name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);6982Py_DECREF(py_level);6983#else6984module = PyImport_ImportModuleLevelObject(6985name, global_dict, empty_dict, list, level);6986#endif6987}6988}6989bad:6990#if PY_MAJOR_VERSION < 36991Py_XDECREF(py_import);6992#endif6993Py_XDECREF(empty_list);6994Py_XDECREF(empty_dict);6995return module;6996}69976998/* CLineInTraceback */6999#ifndef CYTHON_CLINE_IN_TRACEBACK7000static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {7001PyObject *use_cline;7002PyObject *ptype, *pvalue, *ptraceback;7003#if CYTHON_COMPILING_IN_CPYTHON7004PyObject **cython_runtime_dict;7005#endif7006if (unlikely(!__pyx_cython_runtime)) {7007return c_line;7008}7009__Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);7010#if CYTHON_COMPILING_IN_CPYTHON7011cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);7012if (likely(cython_runtime_dict)) {7013__PYX_PY_DICT_LOOKUP_IF_MODIFIED(7014use_cline, *cython_runtime_dict,7015__Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))7016} else7017#endif7018{7019PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);7020if (use_cline_obj) {7021use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;7022Py_DECREF(use_cline_obj);7023} else {7024PyErr_Clear();7025use_cline = NULL;7026}7027}7028if (!use_cline) {7029c_line = 0;7030PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);7031}7032else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {7033c_line = 0;7034}7035__Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);7036return c_line;7037}7038#endif70397040/* CodeObjectCache */7041static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {7042int start = 0, mid = 0, end = count - 1;7043if (end >= 0 && code_line > entries[end].code_line) {7044return count;7045}7046while (start < end) {7047mid = start + (end - start) / 2;7048if (code_line < entries[mid].code_line) {7049end = mid;7050} else if (code_line > entries[mid].code_line) {7051start = mid + 1;7052} else {7053return mid;7054}7055}7056if (code_line <= entries[mid].code_line) {7057return mid;7058} else {7059return mid + 1;7060}7061}7062static PyCodeObject *__pyx_find_code_object(int code_line) {7063PyCodeObject* code_object;7064int pos;7065if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {7066return NULL;7067}7068pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);7069if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {7070return NULL;7071}7072code_object = __pyx_code_cache.entries[pos].code_object;7073Py_INCREF(code_object);7074return code_object;7075}7076static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {7077int pos, i;7078__Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;7079if (unlikely(!code_line)) {7080return;7081}7082if (unlikely(!entries)) {7083entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));7084if (likely(entries)) {7085__pyx_code_cache.entries = entries;7086__pyx_code_cache.max_count = 64;7087__pyx_code_cache.count = 1;7088entries[0].code_line = code_line;7089entries[0].code_object = code_object;7090Py_INCREF(code_object);7091}7092return;7093}7094pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);7095if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {7096PyCodeObject* tmp = entries[pos].code_object;7097entries[pos].code_object = code_object;7098Py_DECREF(tmp);7099return;7100}7101if (__pyx_code_cache.count == __pyx_code_cache.max_count) {7102int new_max = __pyx_code_cache.max_count + 64;7103entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(7104__pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));7105if (unlikely(!entries)) {7106return;7107}7108__pyx_code_cache.entries = entries;7109__pyx_code_cache.max_count = new_max;7110}7111for (i=__pyx_code_cache.count; i>pos; i--) {7112entries[i] = entries[i-1];7113}7114entries[pos].code_line = code_line;7115entries[pos].code_object = code_object;7116__pyx_code_cache.count++;7117Py_INCREF(code_object);7118}71197120/* AddTraceback */7121#include "compile.h"7122#include "frameobject.h"7123#include "traceback.h"7124static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(7125const char *funcname, int c_line,7126int py_line, const char *filename) {7127PyCodeObject *py_code = 0;7128PyObject *py_srcfile = 0;7129PyObject *py_funcname = 0;7130#if PY_MAJOR_VERSION < 37131py_srcfile = PyString_FromString(filename);7132#else7133py_srcfile = PyUnicode_FromString(filename);7134#endif7135if (!py_srcfile) goto bad;7136if (c_line) {7137#if PY_MAJOR_VERSION < 37138py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);7139#else7140py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);7141#endif7142}7143else {7144#if PY_MAJOR_VERSION < 37145py_funcname = PyString_FromString(funcname);7146#else7147py_funcname = PyUnicode_FromString(funcname);7148#endif7149}7150if (!py_funcname) goto bad;7151py_code = __Pyx_PyCode_New(71520,71530,71540,71550,71560,7157__pyx_empty_bytes, /*PyObject *code,*/7158__pyx_empty_tuple, /*PyObject *consts,*/7159__pyx_empty_tuple, /*PyObject *names,*/7160__pyx_empty_tuple, /*PyObject *varnames,*/7161__pyx_empty_tuple, /*PyObject *freevars,*/7162__pyx_empty_tuple, /*PyObject *cellvars,*/7163py_srcfile, /*PyObject *filename,*/7164py_funcname, /*PyObject *name,*/7165py_line,7166__pyx_empty_bytes /*PyObject *lnotab*/7167);7168Py_DECREF(py_srcfile);7169Py_DECREF(py_funcname);7170return py_code;7171bad:7172Py_XDECREF(py_srcfile);7173Py_XDECREF(py_funcname);7174return NULL;7175}7176static void __Pyx_AddTraceback(const char *funcname, int c_line,7177int py_line, const char *filename) {7178PyCodeObject *py_code = 0;7179PyFrameObject *py_frame = 0;7180PyThreadState *tstate = __Pyx_PyThreadState_Current;7181if (c_line) {7182c_line = __Pyx_CLineForTraceback(tstate, c_line);7183}7184py_code = __pyx_find_code_object(c_line ? -c_line : py_line);7185if (!py_code) {7186py_code = __Pyx_CreateCodeObjectForTraceback(7187funcname, c_line, py_line, filename);7188if (!py_code) goto bad;7189__pyx_insert_code_object(c_line ? -c_line : py_line, py_code);7190}7191py_frame = PyFrame_New(7192tstate, /*PyThreadState *tstate,*/7193py_code, /*PyCodeObject *code,*/7194__pyx_d, /*PyObject *globals,*/71950 /*PyObject *locals*/7196);7197if (!py_frame) goto bad;7198__Pyx_PyFrame_SetLineNumber(py_frame, py_line);7199PyTraceBack_Here(py_frame);7200bad:7201Py_XDECREF(py_code);7202Py_XDECREF(py_frame);7203}72047205#if PY_MAJOR_VERSION < 37206static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {7207if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);7208if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);7209PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);7210return -1;7211}7212static void __Pyx_ReleaseBuffer(Py_buffer *view) {7213PyObject *obj = view->obj;7214if (!obj) return;7215if (PyObject_CheckBuffer(obj)) {7216PyBuffer_Release(view);7217return;7218}7219if ((0)) {}7220else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view);7221view->obj = NULL;7222Py_DECREF(obj);7223}7224#endif722572267227/* CIntFromPyVerify */7228#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\7229__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)7230#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\7231__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)7232#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\7233{\7234func_type value = func_value;\7235if (sizeof(target_type) < sizeof(func_type)) {\7236if (unlikely(value != (func_type) (target_type) value)) {\7237func_type zero = 0;\7238if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\7239return (target_type) -1;\7240if (is_unsigned && unlikely(value < zero))\7241goto raise_neg_overflow;\7242else\7243goto raise_overflow;\7244}\7245}\7246return (target_type) value;\7247}72487249/* CIntToPy */7250static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {7251const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;7252const int is_unsigned = neg_one > const_zero;7253if (is_unsigned) {7254if (sizeof(int) < sizeof(long)) {7255return PyInt_FromLong((long) value);7256} else if (sizeof(int) <= sizeof(unsigned long)) {7257return PyLong_FromUnsignedLong((unsigned long) value);7258#ifdef HAVE_LONG_LONG7259} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {7260return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);7261#endif7262}7263} else {7264if (sizeof(int) <= sizeof(long)) {7265return PyInt_FromLong((long) value);7266#ifdef HAVE_LONG_LONG7267} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {7268return PyLong_FromLongLong((PY_LONG_LONG) value);7269#endif7270}7271}7272{7273int one = 1; int little = (int)*(unsigned char *)&one;7274unsigned char *bytes = (unsigned char *)&value;7275return _PyLong_FromByteArray(bytes, sizeof(int),7276little, !is_unsigned);7277}7278}72797280/* Declarations */7281#if CYTHON_CCOMPLEX7282#ifdef __cplusplus7283static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {7284return ::std::complex< float >(x, y);7285}7286#else7287static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {7288return x + y*(__pyx_t_float_complex)_Complex_I;7289}7290#endif7291#else7292static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {7293__pyx_t_float_complex z;7294z.real = x;7295z.imag = y;7296return z;7297}7298#endif72997300/* Arithmetic */7301#if CYTHON_CCOMPLEX7302#else7303static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {7304return (a.real == b.real) && (a.imag == b.imag);7305}7306static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {7307__pyx_t_float_complex z;7308z.real = a.real + b.real;7309z.imag = a.imag + b.imag;7310return z;7311}7312static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {7313__pyx_t_float_complex z;7314z.real = a.real - b.real;7315z.imag = a.imag - b.imag;7316return z;7317}7318static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {7319__pyx_t_float_complex z;7320z.real = a.real * b.real - a.imag * b.imag;7321z.imag = a.real * b.imag + a.imag * b.real;7322return z;7323}7324#if 17325static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {7326if (b.imag == 0) {7327return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);7328} else if (fabsf(b.real) >= fabsf(b.imag)) {7329if (b.real == 0 && b.imag == 0) {7330return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);7331} else {7332float r = b.imag / b.real;7333float s = (float)(1.0) / (b.real + b.imag * r);7334return __pyx_t_float_complex_from_parts(7335(a.real + a.imag * r) * s, (a.imag - a.real * r) * s);7336}7337} else {7338float r = b.real / b.imag;7339float s = (float)(1.0) / (b.imag + b.real * r);7340return __pyx_t_float_complex_from_parts(7341(a.real * r + a.imag) * s, (a.imag * r - a.real) * s);7342}7343}7344#else7345static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {7346if (b.imag == 0) {7347return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);7348} else {7349float denom = b.real * b.real + b.imag * b.imag;7350return __pyx_t_float_complex_from_parts(7351(a.real * b.real + a.imag * b.imag) / denom,7352(a.imag * b.real - a.real * b.imag) / denom);7353}7354}7355#endif7356static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {7357__pyx_t_float_complex z;7358z.real = -a.real;7359z.imag = -a.imag;7360return z;7361}7362static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {7363return (a.real == 0) && (a.imag == 0);7364}7365static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {7366__pyx_t_float_complex z;7367z.real = a.real;7368z.imag = -a.imag;7369return z;7370}7371#if 17372static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {7373#if !defined(HAVE_HYPOT) || defined(_MSC_VER)7374return sqrtf(z.real*z.real + z.imag*z.imag);7375#else7376return hypotf(z.real, z.imag);7377#endif7378}7379static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {7380__pyx_t_float_complex z;7381float r, lnr, theta, z_r, z_theta;7382if (b.imag == 0 && b.real == (int)b.real) {7383if (b.real < 0) {7384float denom = a.real * a.real + a.imag * a.imag;7385a.real = a.real / denom;7386a.imag = -a.imag / denom;7387b.real = -b.real;7388}7389switch ((int)b.real) {7390case 0:7391z.real = 1;7392z.imag = 0;7393return z;7394case 1:7395return a;7396case 2:7397return __Pyx_c_prod_float(a, a);7398case 3:7399z = __Pyx_c_prod_float(a, a);7400return __Pyx_c_prod_float(z, a);7401case 4:7402z = __Pyx_c_prod_float(a, a);7403return __Pyx_c_prod_float(z, z);7404}7405}7406if (a.imag == 0) {7407if (a.real == 0) {7408return a;7409} else if (b.imag == 0) {7410z.real = powf(a.real, b.real);7411z.imag = 0;7412return z;7413} else if (a.real > 0) {7414r = a.real;7415theta = 0;7416} else {7417r = -a.real;7418theta = atan2f(0.0, -1.0);7419}7420} else {7421r = __Pyx_c_abs_float(a);7422theta = atan2f(a.imag, a.real);7423}7424lnr = logf(r);7425z_r = expf(lnr * b.real - theta * b.imag);7426z_theta = theta * b.real + lnr * b.imag;7427z.real = z_r * cosf(z_theta);7428z.imag = z_r * sinf(z_theta);7429return z;7430}7431#endif7432#endif74337434/* Declarations */7435#if CYTHON_CCOMPLEX7436#ifdef __cplusplus7437static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {7438return ::std::complex< double >(x, y);7439}7440#else7441static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {7442return x + y*(__pyx_t_double_complex)_Complex_I;7443}7444#endif7445#else7446static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {7447__pyx_t_double_complex z;7448z.real = x;7449z.imag = y;7450return z;7451}7452#endif74537454/* Arithmetic */7455#if CYTHON_CCOMPLEX7456#else7457static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {7458return (a.real == b.real) && (a.imag == b.imag);7459}7460static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {7461__pyx_t_double_complex z;7462z.real = a.real + b.real;7463z.imag = a.imag + b.imag;7464return z;7465}7466static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {7467__pyx_t_double_complex z;7468z.real = a.real - b.real;7469z.imag = a.imag - b.imag;7470return z;7471}7472static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {7473__pyx_t_double_complex z;7474z.real = a.real * b.real - a.imag * b.imag;7475z.imag = a.real * b.imag + a.imag * b.real;7476return z;7477}7478#if 17479static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {7480if (b.imag == 0) {7481return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);7482} else if (fabs(b.real) >= fabs(b.imag)) {7483if (b.real == 0 && b.imag == 0) {7484return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);7485} else {7486double r = b.imag / b.real;7487double s = (double)(1.0) / (b.real + b.imag * r);7488return __pyx_t_double_complex_from_parts(7489(a.real + a.imag * r) * s, (a.imag - a.real * r) * s);7490}7491} else {7492double r = b.real / b.imag;7493double s = (double)(1.0) / (b.imag + b.real * r);7494return __pyx_t_double_complex_from_parts(7495(a.real * r + a.imag) * s, (a.imag * r - a.real) * s);7496}7497}7498#else7499static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {7500if (b.imag == 0) {7501return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);7502} else {7503double denom = b.real * b.real + b.imag * b.imag;7504return __pyx_t_double_complex_from_parts(7505(a.real * b.real + a.imag * b.imag) / denom,7506(a.imag * b.real - a.real * b.imag) / denom);7507}7508}7509#endif7510static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {7511__pyx_t_double_complex z;7512z.real = -a.real;7513z.imag = -a.imag;7514return z;7515}7516static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {7517return (a.real == 0) && (a.imag == 0);7518}7519static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {7520__pyx_t_double_complex z;7521z.real = a.real;7522z.imag = -a.imag;7523return z;7524}7525#if 17526static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {7527#if !defined(HAVE_HYPOT) || defined(_MSC_VER)7528return sqrt(z.real*z.real + z.imag*z.imag);7529#else7530return hypot(z.real, z.imag);7531#endif7532}7533static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {7534__pyx_t_double_complex z;7535double r, lnr, theta, z_r, z_theta;7536if (b.imag == 0 && b.real == (int)b.real) {7537if (b.real < 0) {7538double denom = a.real * a.real + a.imag * a.imag;7539a.real = a.real / denom;7540a.imag = -a.imag / denom;7541b.real = -b.real;7542}7543switch ((int)b.real) {7544case 0:7545z.real = 1;7546z.imag = 0;7547return z;7548case 1:7549return a;7550case 2:7551return __Pyx_c_prod_double(a, a);7552case 3:7553z = __Pyx_c_prod_double(a, a);7554return __Pyx_c_prod_double(z, a);7555case 4:7556z = __Pyx_c_prod_double(a, a);7557return __Pyx_c_prod_double(z, z);7558}7559}7560if (a.imag == 0) {7561if (a.real == 0) {7562return a;7563} else if (b.imag == 0) {7564z.real = pow(a.real, b.real);7565z.imag = 0;7566return z;7567} else if (a.real > 0) {7568r = a.real;7569theta = 0;7570} else {7571r = -a.real;7572theta = atan2(0.0, -1.0);7573}7574} else {7575r = __Pyx_c_abs_double(a);7576theta = atan2(a.imag, a.real);7577}7578lnr = log(r);7579z_r = exp(lnr * b.real - theta * b.imag);7580z_theta = theta * b.real + lnr * b.imag;7581z.real = z_r * cos(z_theta);7582z.imag = z_r * sin(z_theta);7583return z;7584}7585#endif7586#endif75877588/* CIntToPy */7589static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {7590const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;7591const int is_unsigned = neg_one > const_zero;7592if (is_unsigned) {7593if (sizeof(enum NPY_TYPES) < sizeof(long)) {7594return PyInt_FromLong((long) value);7595} else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {7596return PyLong_FromUnsignedLong((unsigned long) value);7597#ifdef HAVE_LONG_LONG7598} else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {7599return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);7600#endif7601}7602} else {7603if (sizeof(enum NPY_TYPES) <= sizeof(long)) {7604return PyInt_FromLong((long) value);7605#ifdef HAVE_LONG_LONG7606} else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {7607return PyLong_FromLongLong((PY_LONG_LONG) value);7608#endif7609}7610}7611{7612int one = 1; int little = (int)*(unsigned char *)&one;7613unsigned char *bytes = (unsigned char *)&value;7614return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),7615little, !is_unsigned);7616}7617}76187619/* CIntFromPy */7620static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) {7621const npy_int32 neg_one = (npy_int32) ((npy_int32) 0 - (npy_int32) 1), const_zero = (npy_int32) 0;7622const int is_unsigned = neg_one > const_zero;7623#if PY_MAJOR_VERSION < 37624if (likely(PyInt_Check(x))) {7625if (sizeof(npy_int32) < sizeof(long)) {7626__PYX_VERIFY_RETURN_INT(npy_int32, long, PyInt_AS_LONG(x))7627} else {7628long val = PyInt_AS_LONG(x);7629if (is_unsigned && unlikely(val < 0)) {7630goto raise_neg_overflow;7631}7632return (npy_int32) val;7633}7634} else7635#endif7636if (likely(PyLong_Check(x))) {7637if (is_unsigned) {7638#if CYTHON_USE_PYLONG_INTERNALS7639const digit* digits = ((PyLongObject*)x)->ob_digit;7640switch (Py_SIZE(x)) {7641case 0: return (npy_int32) 0;7642case 1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, digits[0])7643case 2:7644if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) {7645if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {7646__PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7647} else if (8 * sizeof(npy_int32) >= 2 * PyLong_SHIFT) {7648return (npy_int32) (((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]));7649}7650}7651break;7652case 3:7653if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) {7654if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {7655__PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7656} else if (8 * sizeof(npy_int32) >= 3 * PyLong_SHIFT) {7657return (npy_int32) (((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]));7658}7659}7660break;7661case 4:7662if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) {7663if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {7664__PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7665} else if (8 * sizeof(npy_int32) >= 4 * PyLong_SHIFT) {7666return (npy_int32) (((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]));7667}7668}7669break;7670}7671#endif7672#if CYTHON_COMPILING_IN_CPYTHON7673if (unlikely(Py_SIZE(x) < 0)) {7674goto raise_neg_overflow;7675}7676#else7677{7678int result = PyObject_RichCompareBool(x, Py_False, Py_LT);7679if (unlikely(result < 0))7680return (npy_int32) -1;7681if (unlikely(result == 1))7682goto raise_neg_overflow;7683}7684#endif7685if (sizeof(npy_int32) <= sizeof(unsigned long)) {7686__PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned long, PyLong_AsUnsignedLong(x))7687#ifdef HAVE_LONG_LONG7688} else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) {7689__PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))7690#endif7691}7692} else {7693#if CYTHON_USE_PYLONG_INTERNALS7694const digit* digits = ((PyLongObject*)x)->ob_digit;7695switch (Py_SIZE(x)) {7696case 0: return (npy_int32) 0;7697case -1: __PYX_VERIFY_RETURN_INT(npy_int32, sdigit, (sdigit) (-(sdigit)digits[0]))7698case 1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, +digits[0])7699case -2:7700if (8 * sizeof(npy_int32) - 1 > 1 * PyLong_SHIFT) {7701if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {7702__PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7703} else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) {7704return (npy_int32) (((npy_int32)-1)*(((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));7705}7706}7707break;7708case 2:7709if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) {7710if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {7711__PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7712} else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) {7713return (npy_int32) ((((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));7714}7715}7716break;7717case -3:7718if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) {7719if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {7720__PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7721} else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) {7722return (npy_int32) (((npy_int32)-1)*(((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));7723}7724}7725break;7726case 3:7727if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) {7728if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {7729__PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7730} else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) {7731return (npy_int32) ((((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));7732}7733}7734break;7735case -4:7736if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) {7737if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {7738__PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7739} else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) {7740return (npy_int32) (((npy_int32)-1)*(((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));7741}7742}7743break;7744case 4:7745if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) {7746if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {7747__PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7748} else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) {7749return (npy_int32) ((((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));7750}7751}7752break;7753}7754#endif7755if (sizeof(npy_int32) <= sizeof(long)) {7756__PYX_VERIFY_RETURN_INT_EXC(npy_int32, long, PyLong_AsLong(x))7757#ifdef HAVE_LONG_LONG7758} else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) {7759__PYX_VERIFY_RETURN_INT_EXC(npy_int32, PY_LONG_LONG, PyLong_AsLongLong(x))7760#endif7761}7762}7763{7764#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)7765PyErr_SetString(PyExc_RuntimeError,7766"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");7767#else7768npy_int32 val;7769PyObject *v = __Pyx_PyNumber_IntOrLong(x);7770#if PY_MAJOR_VERSION < 37771if (likely(v) && !PyLong_Check(v)) {7772PyObject *tmp = v;7773v = PyNumber_Long(tmp);7774Py_DECREF(tmp);7775}7776#endif7777if (likely(v)) {7778int one = 1; int is_little = (int)*(unsigned char *)&one;7779unsigned char *bytes = (unsigned char *)&val;7780int ret = _PyLong_AsByteArray((PyLongObject *)v,7781bytes, sizeof(val),7782is_little, !is_unsigned);7783Py_DECREF(v);7784if (likely(!ret))7785return val;7786}7787#endif7788return (npy_int32) -1;7789}7790} else {7791npy_int32 val;7792PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);7793if (!tmp) return (npy_int32) -1;7794val = __Pyx_PyInt_As_npy_int32(tmp);7795Py_DECREF(tmp);7796return val;7797}7798raise_overflow:7799PyErr_SetString(PyExc_OverflowError,7800"value too large to convert to npy_int32");7801return (npy_int32) -1;7802raise_neg_overflow:7803PyErr_SetString(PyExc_OverflowError,7804"can't convert negative value to npy_int32");7805return (npy_int32) -1;7806}78077808/* CIntFromPy */7809static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {7810const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;7811const int is_unsigned = neg_one > const_zero;7812#if PY_MAJOR_VERSION < 37813if (likely(PyInt_Check(x))) {7814if (sizeof(int) < sizeof(long)) {7815__PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))7816} else {7817long val = PyInt_AS_LONG(x);7818if (is_unsigned && unlikely(val < 0)) {7819goto raise_neg_overflow;7820}7821return (int) val;7822}7823} else7824#endif7825if (likely(PyLong_Check(x))) {7826if (is_unsigned) {7827#if CYTHON_USE_PYLONG_INTERNALS7828const digit* digits = ((PyLongObject*)x)->ob_digit;7829switch (Py_SIZE(x)) {7830case 0: return (int) 0;7831case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])7832case 2:7833if (8 * sizeof(int) > 1 * PyLong_SHIFT) {7834if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {7835__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7836} else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {7837return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));7838}7839}7840break;7841case 3:7842if (8 * sizeof(int) > 2 * PyLong_SHIFT) {7843if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {7844__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7845} else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {7846return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));7847}7848}7849break;7850case 4:7851if (8 * sizeof(int) > 3 * PyLong_SHIFT) {7852if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {7853__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])))7854} else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {7855return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));7856}7857}7858break;7859}7860#endif7861#if CYTHON_COMPILING_IN_CPYTHON7862if (unlikely(Py_SIZE(x) < 0)) {7863goto raise_neg_overflow;7864}7865#else7866{7867int result = PyObject_RichCompareBool(x, Py_False, Py_LT);7868if (unlikely(result < 0))7869return (int) -1;7870if (unlikely(result == 1))7871goto raise_neg_overflow;7872}7873#endif7874if (sizeof(int) <= sizeof(unsigned long)) {7875__PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))7876#ifdef HAVE_LONG_LONG7877} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {7878__PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))7879#endif7880}7881} else {7882#if CYTHON_USE_PYLONG_INTERNALS7883const digit* digits = ((PyLongObject*)x)->ob_digit;7884switch (Py_SIZE(x)) {7885case 0: return (int) 0;7886case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))7887case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])7888case -2:7889if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {7890if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {7891__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7892} else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {7893return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));7894}7895}7896break;7897case 2:7898if (8 * sizeof(int) > 1 * PyLong_SHIFT) {7899if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {7900__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7901} else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {7902return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));7903}7904}7905break;7906case -3:7907if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {7908if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {7909__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7910} else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {7911return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));7912}7913}7914break;7915case 3:7916if (8 * sizeof(int) > 2 * PyLong_SHIFT) {7917if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {7918__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))7919} else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {7920return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));7921}7922}7923break;7924case -4:7925if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {7926if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {7927__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])))7928} else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {7929return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));7930}7931}7932break;7933case 4:7934if (8 * sizeof(int) > 3 * PyLong_SHIFT) {7935if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {7936__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])))7937} else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {7938return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));7939}7940}7941break;7942}7943#endif7944if (sizeof(int) <= sizeof(long)) {7945__PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))7946#ifdef HAVE_LONG_LONG7947} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {7948__PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))7949#endif7950}7951}7952{7953#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)7954PyErr_SetString(PyExc_RuntimeError,7955"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");7956#else7957int val;7958PyObject *v = __Pyx_PyNumber_IntOrLong(x);7959#if PY_MAJOR_VERSION < 37960if (likely(v) && !PyLong_Check(v)) {7961PyObject *tmp = v;7962v = PyNumber_Long(tmp);7963Py_DECREF(tmp);7964}7965#endif7966if (likely(v)) {7967int one = 1; int is_little = (int)*(unsigned char *)&one;7968unsigned char *bytes = (unsigned char *)&val;7969int ret = _PyLong_AsByteArray((PyLongObject *)v,7970bytes, sizeof(val),7971is_little, !is_unsigned);7972Py_DECREF(v);7973if (likely(!ret))7974return val;7975}7976#endif7977return (int) -1;7978}7979} else {7980int val;7981PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);7982if (!tmp) return (int) -1;7983val = __Pyx_PyInt_As_int(tmp);7984Py_DECREF(tmp);7985return val;7986}7987raise_overflow:7988PyErr_SetString(PyExc_OverflowError,7989"value too large to convert to int");7990return (int) -1;7991raise_neg_overflow:7992PyErr_SetString(PyExc_OverflowError,7993"can't convert negative value to int");7994return (int) -1;7995}79967997/* CIntToPy */7998static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {7999const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;8000const int is_unsigned = neg_one > const_zero;8001if (is_unsigned) {8002if (sizeof(long) < sizeof(long)) {8003return PyInt_FromLong((long) value);8004} else if (sizeof(long) <= sizeof(unsigned long)) {8005return PyLong_FromUnsignedLong((unsigned long) value);8006#ifdef HAVE_LONG_LONG8007} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {8008return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);8009#endif8010}8011} else {8012if (sizeof(long) <= sizeof(long)) {8013return PyInt_FromLong((long) value);8014#ifdef HAVE_LONG_LONG8015} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {8016return PyLong_FromLongLong((PY_LONG_LONG) value);8017#endif8018}8019}8020{8021int one = 1; int little = (int)*(unsigned char *)&one;8022unsigned char *bytes = (unsigned char *)&value;8023return _PyLong_FromByteArray(bytes, sizeof(long),8024little, !is_unsigned);8025}8026}80278028/* CIntFromPy */8029static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {8030const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;8031const int is_unsigned = neg_one > const_zero;8032#if PY_MAJOR_VERSION < 38033if (likely(PyInt_Check(x))) {8034if (sizeof(long) < sizeof(long)) {8035__PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))8036} else {8037long val = PyInt_AS_LONG(x);8038if (is_unsigned && unlikely(val < 0)) {8039goto raise_neg_overflow;8040}8041return (long) val;8042}8043} else8044#endif8045if (likely(PyLong_Check(x))) {8046if (is_unsigned) {8047#if CYTHON_USE_PYLONG_INTERNALS8048const digit* digits = ((PyLongObject*)x)->ob_digit;8049switch (Py_SIZE(x)) {8050case 0: return (long) 0;8051case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])8052case 2:8053if (8 * sizeof(long) > 1 * PyLong_SHIFT) {8054if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {8055__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))8056} else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {8057return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));8058}8059}8060break;8061case 3:8062if (8 * sizeof(long) > 2 * PyLong_SHIFT) {8063if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {8064__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))8065} else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {8066return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));8067}8068}8069break;8070case 4:8071if (8 * sizeof(long) > 3 * PyLong_SHIFT) {8072if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {8073__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])))8074} else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {8075return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));8076}8077}8078break;8079}8080#endif8081#if CYTHON_COMPILING_IN_CPYTHON8082if (unlikely(Py_SIZE(x) < 0)) {8083goto raise_neg_overflow;8084}8085#else8086{8087int result = PyObject_RichCompareBool(x, Py_False, Py_LT);8088if (unlikely(result < 0))8089return (long) -1;8090if (unlikely(result == 1))8091goto raise_neg_overflow;8092}8093#endif8094if (sizeof(long) <= sizeof(unsigned long)) {8095__PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))8096#ifdef HAVE_LONG_LONG8097} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {8098__PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))8099#endif8100}8101} else {8102#if CYTHON_USE_PYLONG_INTERNALS8103const digit* digits = ((PyLongObject*)x)->ob_digit;8104switch (Py_SIZE(x)) {8105case 0: return (long) 0;8106case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))8107case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])8108case -2:8109if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {8110if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {8111__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))8112} else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {8113return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));8114}8115}8116break;8117case 2:8118if (8 * sizeof(long) > 1 * PyLong_SHIFT) {8119if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {8120__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))8121} else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {8122return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));8123}8124}8125break;8126case -3:8127if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {8128if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {8129__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))8130} else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {8131return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));8132}8133}8134break;8135case 3:8136if (8 * sizeof(long) > 2 * PyLong_SHIFT) {8137if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {8138__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))8139} else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {8140return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));8141}8142}8143break;8144case -4:8145if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {8146if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {8147__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])))8148} else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {8149return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));8150}8151}8152break;8153case 4:8154if (8 * sizeof(long) > 3 * PyLong_SHIFT) {8155if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {8156__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])))8157} else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {8158return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));8159}8160}8161break;8162}8163#endif8164if (sizeof(long) <= sizeof(long)) {8165__PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))8166#ifdef HAVE_LONG_LONG8167} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {8168__PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))8169#endif8170}8171}8172{8173#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)8174PyErr_SetString(PyExc_RuntimeError,8175"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");8176#else8177long val;8178PyObject *v = __Pyx_PyNumber_IntOrLong(x);8179#if PY_MAJOR_VERSION < 38180if (likely(v) && !PyLong_Check(v)) {8181PyObject *tmp = v;8182v = PyNumber_Long(tmp);8183Py_DECREF(tmp);8184}8185#endif8186if (likely(v)) {8187int one = 1; int is_little = (int)*(unsigned char *)&one;8188unsigned char *bytes = (unsigned char *)&val;8189int ret = _PyLong_AsByteArray((PyLongObject *)v,8190bytes, sizeof(val),8191is_little, !is_unsigned);8192Py_DECREF(v);8193if (likely(!ret))8194return val;8195}8196#endif8197return (long) -1;8198}8199} else {8200long val;8201PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);8202if (!tmp) return (long) -1;8203val = __Pyx_PyInt_As_long(tmp);8204Py_DECREF(tmp);8205return val;8206}8207raise_overflow:8208PyErr_SetString(PyExc_OverflowError,8209"value too large to convert to long");8210return (long) -1;8211raise_neg_overflow:8212PyErr_SetString(PyExc_OverflowError,8213"can't convert negative value to long");8214return (long) -1;8215}82168217/* FastTypeChecks */8218#if CYTHON_COMPILING_IN_CPYTHON8219static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {8220while (a) {8221a = a->tp_base;8222if (a == b)8223return 1;8224}8225return b == &PyBaseObject_Type;8226}8227static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {8228PyObject *mro;8229if (a == b) return 1;8230mro = a->tp_mro;8231if (likely(mro)) {8232Py_ssize_t i, n;8233n = PyTuple_GET_SIZE(mro);8234for (i = 0; i < n; i++) {8235if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)8236return 1;8237}8238return 0;8239}8240return __Pyx_InBases(a, b);8241}8242#if PY_MAJOR_VERSION == 28243static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {8244PyObject *exception, *value, *tb;8245int res;8246__Pyx_PyThreadState_declare8247__Pyx_PyThreadState_assign8248__Pyx_ErrFetch(&exception, &value, &tb);8249res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;8250if (unlikely(res == -1)) {8251PyErr_WriteUnraisable(err);8252res = 0;8253}8254if (!res) {8255res = PyObject_IsSubclass(err, exc_type2);8256if (unlikely(res == -1)) {8257PyErr_WriteUnraisable(err);8258res = 0;8259}8260}8261__Pyx_ErrRestore(exception, value, tb);8262return res;8263}8264#else8265static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {8266int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;8267if (!res) {8268res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);8269}8270return res;8271}8272#endif8273static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {8274Py_ssize_t i, n;8275assert(PyExceptionClass_Check(exc_type));8276n = PyTuple_GET_SIZE(tuple);8277#if PY_MAJOR_VERSION >= 38278for (i=0; i<n; i++) {8279if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;8280}8281#endif8282for (i=0; i<n; i++) {8283PyObject *t = PyTuple_GET_ITEM(tuple, i);8284#if PY_MAJOR_VERSION < 38285if (likely(exc_type == t)) return 1;8286#endif8287if (likely(PyExceptionClass_Check(t))) {8288if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;8289} else {8290}8291}8292return 0;8293}8294static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {8295if (likely(err == exc_type)) return 1;8296if (likely(PyExceptionClass_Check(err))) {8297if (likely(PyExceptionClass_Check(exc_type))) {8298return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);8299} else if (likely(PyTuple_Check(exc_type))) {8300return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);8301} else {8302}8303}8304return PyErr_GivenExceptionMatches(err, exc_type);8305}8306static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {8307assert(PyExceptionClass_Check(exc_type1));8308assert(PyExceptionClass_Check(exc_type2));8309if (likely(err == exc_type1 || err == exc_type2)) return 1;8310if (likely(PyExceptionClass_Check(err))) {8311return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);8312}8313return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));8314}8315#endif83168317/* CheckBinaryVersion */8318static int __Pyx_check_binary_version(void) {8319char ctversion[4], rtversion[4];8320PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);8321PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());8322if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {8323char message[200];8324PyOS_snprintf(message, sizeof(message),8325"compiletime version %s of module '%.100s' "8326"does not match runtime version %s",8327ctversion, __Pyx_MODULE_NAME, rtversion);8328return PyErr_WarnEx(NULL, message, 1);8329}8330return 0;8331}83328333/* InitStrings */8334static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {8335while (t->p) {8336#if PY_MAJOR_VERSION < 38337if (t->is_unicode) {8338*t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);8339} else if (t->intern) {8340*t->p = PyString_InternFromString(t->s);8341} else {8342*t->p = PyString_FromStringAndSize(t->s, t->n - 1);8343}8344#else8345if (t->is_unicode | t->is_str) {8346if (t->intern) {8347*t->p = PyUnicode_InternFromString(t->s);8348} else if (t->encoding) {8349*t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);8350} else {8351*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);8352}8353} else {8354*t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);8355}8356#endif8357if (!*t->p)8358return -1;8359if (PyObject_Hash(*t->p) == -1)8360return -1;8361++t;8362}8363return 0;8364}83658366static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {8367return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));8368}8369static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {8370Py_ssize_t ignore;8371return __Pyx_PyObject_AsStringAndSize(o, &ignore);8372}8373#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT8374#if !CYTHON_PEP393_ENABLED8375static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {8376char* defenc_c;8377PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);8378if (!defenc) return NULL;8379defenc_c = PyBytes_AS_STRING(defenc);8380#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII8381{8382char* end = defenc_c + PyBytes_GET_SIZE(defenc);8383char* c;8384for (c = defenc_c; c < end; c++) {8385if ((unsigned char) (*c) >= 128) {8386PyUnicode_AsASCIIString(o);8387return NULL;8388}8389}8390}8391#endif8392*length = PyBytes_GET_SIZE(defenc);8393return defenc_c;8394}8395#else8396static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {8397if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;8398#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII8399if (likely(PyUnicode_IS_ASCII(o))) {8400*length = PyUnicode_GET_LENGTH(o);8401return PyUnicode_AsUTF8(o);8402} else {8403PyUnicode_AsASCIIString(o);8404return NULL;8405}8406#else8407return PyUnicode_AsUTF8AndSize(o, length);8408#endif8409}8410#endif8411#endif8412static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {8413#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT8414if (8415#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII8416__Pyx_sys_getdefaultencoding_not_ascii &&8417#endif8418PyUnicode_Check(o)) {8419return __Pyx_PyUnicode_AsStringAndSize(o, length);8420} else8421#endif8422#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))8423if (PyByteArray_Check(o)) {8424*length = PyByteArray_GET_SIZE(o);8425return PyByteArray_AS_STRING(o);8426} else8427#endif8428{8429char* result;8430int r = PyBytes_AsStringAndSize(o, &result, length);8431if (unlikely(r < 0)) {8432return NULL;8433} else {8434return result;8435}8436}8437}8438static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {8439int is_true = x == Py_True;8440if (is_true | (x == Py_False) | (x == Py_None)) return is_true;8441else return PyObject_IsTrue(x);8442}8443static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {8444int retval;8445if (unlikely(!x)) return -1;8446retval = __Pyx_PyObject_IsTrue(x);8447Py_DECREF(x);8448return retval;8449}8450static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {8451#if PY_MAJOR_VERSION >= 38452if (PyLong_Check(result)) {8453if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,8454"__int__ returned non-int (type %.200s). "8455"The ability to return an instance of a strict subclass of int "8456"is deprecated, and may be removed in a future version of Python.",8457Py_TYPE(result)->tp_name)) {8458Py_DECREF(result);8459return NULL;8460}8461return result;8462}8463#endif8464PyErr_Format(PyExc_TypeError,8465"__%.4s__ returned non-%.4s (type %.200s)",8466type_name, type_name, Py_TYPE(result)->tp_name);8467Py_DECREF(result);8468return NULL;8469}8470static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {8471#if CYTHON_USE_TYPE_SLOTS8472PyNumberMethods *m;8473#endif8474const char *name = NULL;8475PyObject *res = NULL;8476#if PY_MAJOR_VERSION < 38477if (likely(PyInt_Check(x) || PyLong_Check(x)))8478#else8479if (likely(PyLong_Check(x)))8480#endif8481return __Pyx_NewRef(x);8482#if CYTHON_USE_TYPE_SLOTS8483m = Py_TYPE(x)->tp_as_number;8484#if PY_MAJOR_VERSION < 38485if (m && m->nb_int) {8486name = "int";8487res = m->nb_int(x);8488}8489else if (m && m->nb_long) {8490name = "long";8491res = m->nb_long(x);8492}8493#else8494if (likely(m && m->nb_int)) {8495name = "int";8496res = m->nb_int(x);8497}8498#endif8499#else8500if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {8501res = PyNumber_Int(x);8502}8503#endif8504if (likely(res)) {8505#if PY_MAJOR_VERSION < 38506if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {8507#else8508if (unlikely(!PyLong_CheckExact(res))) {8509#endif8510return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);8511}8512}8513else if (!PyErr_Occurred()) {8514PyErr_SetString(PyExc_TypeError,8515"an integer is required");8516}8517return res;8518}8519static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {8520Py_ssize_t ival;8521PyObject *x;8522#if PY_MAJOR_VERSION < 38523if (likely(PyInt_CheckExact(b))) {8524if (sizeof(Py_ssize_t) >= sizeof(long))8525return PyInt_AS_LONG(b);8526else8527return PyInt_AsSsize_t(b);8528}8529#endif8530if (likely(PyLong_CheckExact(b))) {8531#if CYTHON_USE_PYLONG_INTERNALS8532const digit* digits = ((PyLongObject*)b)->ob_digit;8533const Py_ssize_t size = Py_SIZE(b);8534if (likely(__Pyx_sst_abs(size) <= 1)) {8535ival = likely(size) ? digits[0] : 0;8536if (size == -1) ival = -ival;8537return ival;8538} else {8539switch (size) {8540case 2:8541if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {8542return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));8543}8544break;8545case -2:8546if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {8547return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));8548}8549break;8550case 3:8551if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {8552return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));8553}8554break;8555case -3:8556if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {8557return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));8558}8559break;8560case 4:8561if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {8562return (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]));8563}8564break;8565case -4:8566if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {8567return -(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]));8568}8569break;8570}8571}8572#endif8573return PyLong_AsSsize_t(b);8574}8575x = PyNumber_Index(b);8576if (!x) return -1;8577ival = PyInt_AsSsize_t(x);8578Py_DECREF(x);8579return ival;8580}8581static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {8582return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);8583}8584static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {8585return PyInt_FromSize_t(ival);8586}858785888589#endif /* Py_PYTHON_H */859085918592