/* Generated by Cython 0.28.2 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else #define CYTHON_ABI "0_28_2" #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #if PY_VERSION_HEX >= 0x02070000 #define HAVE_LONG_LONG #endif #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #elif !defined(CYTHON_USE_PYLONG_INTERNALS) #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #undef SHIFT #undef BASE #undef MASK #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } # else # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int32 uint32_t; #endif #endif #else #include #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) && __cplusplus >= 201103L #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #elif __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__ ) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #define __Pyx_PyCFunctionFast _PyCFunctionFast #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; // PyThread_create_key reports success always } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif // TSS (Thread Specific Storage) API #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) #else #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_ERR(f_index, lineno, Ln_error) \ { \ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ } #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__pandas___libs__sparse #define __PYX_HAVE_API__pandas___libs__sparse /* Early includes */ #include #include #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } static PyObject *__pyx_m = NULL; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_cython_runtime; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static PyObject *__pyx_empty_unicode; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; /* Header.proto */ #if !defined(CYTHON_CCOMPLEX) #if defined(__cplusplus) #define CYTHON_CCOMPLEX 1 #elif defined(_Complex_I) #define CYTHON_CCOMPLEX 1 #else #define CYTHON_CCOMPLEX 0 #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus #include #else #include #endif #endif #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) #undef _Complex_I #define _Complex_I 1.0fj #endif static const char *__pyx_f[] = { "pandas/_libs/sparse.pyx", "stringsource", "pandas/_libs/sparse_op_helper.pxi", "__init__.pxd", "type.pxd", }; /* BufferFormatStructs.proto */ #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; struct __Pyx_StructField_* fields; size_t size; size_t arraysize[8]; int ndim; char typegroup; char is_unsigned; int flags; } __Pyx_TypeInfo; typedef struct __Pyx_StructField_ { __Pyx_TypeInfo* type; const char* name; size_t offset; } __Pyx_StructField; typedef struct { __Pyx_StructField* field; size_t parent_offset; } __Pyx_BufFmt_StackElem; typedef struct { __Pyx_StructField root; __Pyx_BufFmt_StackElem* head; size_t fmt_offset; size_t new_count, enc_count; size_t struct_alignment; int is_complex; char enc_type; char new_packmode; char enc_packmode; char is_valid_array; } __Pyx_BufFmt_Context; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":730 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t */ typedef npy_int8 __pyx_t_5numpy_int8_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":731 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t */ typedef npy_int16 __pyx_t_5numpy_int16_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":732 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< * ctypedef npy_int64 int64_t * #ctypedef npy_int96 int96_t */ typedef npy_int32 __pyx_t_5numpy_int32_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":733 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< * #ctypedef npy_int96 int96_t * #ctypedef npy_int128 int128_t */ typedef npy_int64 __pyx_t_5numpy_int64_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":737 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":738 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":739 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< * ctypedef npy_uint64 uint64_t * #ctypedef npy_uint96 uint96_t */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":740 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< * #ctypedef npy_uint96 uint96_t * #ctypedef npy_uint128 uint128_t */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":744 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":745 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< * #ctypedef npy_float80 float80_t * #ctypedef npy_float128 float128_t */ typedef npy_float64 __pyx_t_5numpy_float64_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":754 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t */ typedef npy_long __pyx_t_5numpy_int_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":755 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< * ctypedef npy_longlong longlong_t * */ typedef npy_longlong __pyx_t_5numpy_long_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":756 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< * * ctypedef npy_ulong uint_t */ typedef npy_longlong __pyx_t_5numpy_longlong_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":758 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t */ typedef npy_ulong __pyx_t_5numpy_uint_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":759 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":760 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< * * ctypedef npy_intp intp_t */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":762 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":763 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":765 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t */ typedef npy_double __pyx_t_5numpy_float_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":766 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":767 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cfloat cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; /* Declarations.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< float > __pyx_t_float_complex; #else typedef float _Complex __pyx_t_float_complex; #endif #else typedef struct { float real, imag; } __pyx_t_float_complex; #endif static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); /* Declarations.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< double > __pyx_t_double_complex; #else typedef double _Complex __pyx_t_double_complex; #endif #else typedef struct { double real, imag; } __pyx_t_double_complex; #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); /*--- Type declarations ---*/ struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex; struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex; struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex; struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge; struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection; struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":769 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":770 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":771 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cdouble complex_t */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":773 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; /* "pandas/_libs/sparse.pyx":34 * * * cdef class SparseIndex: # <<<<<<<<<<<<<< * """ * Abstract superclass for sparse index types. */ struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex { PyObject_HEAD }; /* "pandas/_libs/sparse.pyx":43 * * * cdef class IntIndex(SparseIndex): # <<<<<<<<<<<<<< * """ * Object for holding exact integer sparse indexing information */ struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex { struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex __pyx_base; struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *__pyx_vtab; Py_ssize_t length; Py_ssize_t npoints; PyArrayObject *indices; }; /* "pandas/_libs/sparse.pyx":320 * # BlockIndex * * cdef class BlockIndex(SparseIndex): # <<<<<<<<<<<<<< * """ * Object for holding block-based sparse indexing information */ struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex { struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex __pyx_base; struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *__pyx_vtab; __pyx_t_5numpy_int32_t nblocks; __pyx_t_5numpy_int32_t npoints; __pyx_t_5numpy_int32_t length; PyArrayObject *blocs; PyArrayObject *blengths; PyObject *__weakref__; __pyx_t_5numpy_int32_t *locbuf; __pyx_t_5numpy_int32_t *lenbuf; }; /* "pandas/_libs/sparse.pyx":625 * * * cdef class BlockMerge(object): # <<<<<<<<<<<<<< * """ * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge { PyObject_HEAD struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockMerge *__pyx_vtab; struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *x; struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *y; struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *result; PyArrayObject *xstart; PyArrayObject *xlen; PyArrayObject *xend; PyArrayObject *ystart; PyArrayObject *ylen; PyArrayObject *yend; __pyx_t_5numpy_int32_t xi; __pyx_t_5numpy_int32_t yi; }; /* "pandas/_libs/sparse.pyx":667 * self.yi = xi * * cdef class BlockIntersection(BlockMerge): # <<<<<<<<<<<<<< * """ * not done yet */ struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection { struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge __pyx_base; }; /* "pandas/_libs/sparse.pyx":673 * pass * * cdef class BlockUnion(BlockMerge): # <<<<<<<<<<<<<< * """ * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion { struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge __pyx_base; }; /* "pandas/_libs/sparse.pyx":43 * * * cdef class IntIndex(SparseIndex): # <<<<<<<<<<<<<< * """ * Object for holding exact integer sparse indexing information */ struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *(*intersect)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch); struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *(*make_union)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch); __pyx_t_5numpy_int32_t (*lookup)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, Py_ssize_t, int __pyx_skip_dispatch); PyArrayObject *(*lookup_array)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, PyArrayObject *, int __pyx_skip_dispatch); PyArrayObject *(*reindex)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch); PyObject *(*put)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*take)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *__pyx_vtabptr_6pandas_5_libs_6sparse_IntIndex; /* "pandas/_libs/sparse.pyx":320 * # BlockIndex * * cdef class BlockIndex(SparseIndex): # <<<<<<<<<<<<<< * """ * Object for holding block-based sparse indexing information */ struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex { PyObject *(*check_integrity)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, int __pyx_skip_dispatch); struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *(*intersect)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch); struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *(*make_union)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch); Py_ssize_t (*lookup)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, Py_ssize_t, int __pyx_skip_dispatch); PyArrayObject *(*lookup_array)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, PyArrayObject *, int __pyx_skip_dispatch); PyArrayObject *(*reindex)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch); PyObject *(*put)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch); PyObject *(*take)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *__pyx_vtabptr_6pandas_5_libs_6sparse_BlockIndex; /* "pandas/_libs/sparse.pyx":625 * * * cdef class BlockMerge(object): # <<<<<<<<<<<<<< * """ * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockMerge { PyObject *(*_make_merged_blocks)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *); PyObject *(*_set_current_indices)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t, int); }; static struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockMerge *__pyx_vtabptr_6pandas_5_libs_6sparse_BlockMerge; /* "pandas/_libs/sparse.pyx":667 * self.yi = xi * * cdef class BlockIntersection(BlockMerge): # <<<<<<<<<<<<<< * """ * not done yet */ struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIntersection { struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockMerge __pyx_base; }; static struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIntersection *__pyx_vtabptr_6pandas_5_libs_6sparse_BlockIntersection; /* "pandas/_libs/sparse.pyx":673 * pass * * cdef class BlockUnion(BlockMerge): # <<<<<<<<<<<<<< * """ * Object-oriented approach makes sharing state between recursive functions a */ struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockUnion { struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockMerge __pyx_base; __pyx_t_5numpy_int32_t (*_find_next_block_end)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *, int); }; static struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockUnion *__pyx_vtabptr_6pandas_5_libs_6sparse_BlockUnion; /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() PyErr_Occurred() #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* GetAttr3.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /* GetModuleGlobalName.proto */ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* PyCFunctionFastCall.proto */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); #else #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) #endif /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs); #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* PyObjectCallNoArg.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* IterFinish.proto */ static CYTHON_INLINE int __Pyx_IterFinish(void); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* IsLittleEndian.proto */ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); /* BufferFormatCheck.proto */ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type); /* BufferGetAndValidate.proto */ #define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\ ((obj == Py_None || obj == NULL) ?\ (__Pyx_ZeroBuffer(buf), 0) :\ __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)) static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static void __Pyx_ZeroBuffer(Py_buffer* buf); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 }; static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; /* BufferFallbackError.proto */ static void __Pyx_RaiseBufferFallbackError(void); /* BufferIndexError.proto */ static void __Pyx_RaiseBufferIndexError(int axis); #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* ObjectGetItem.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key); #else #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif /* None.proto */ static CYTHON_INLINE long __Pyx_div_long(long, long); /* None.proto */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __Pyx_mod___pyx_t_5numpy_float64_t(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /* None.proto */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /* UnaryNegOverflows.proto */ #define UNARY_NEG_WOULD_OVERFLOW(x)\ (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) /* None.proto */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_mod___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /* PyDictContains.proto */ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* DictGetItem.proto */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); #define __Pyx_PyObject_Dict_GetItem(obj, name)\ (likely(PyDict_CheckExact(obj)) ?\ __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) #endif /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); /* RaiseNoneIterError.proto */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* CallNextTpTraverse.proto */ static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); /* CallNextTpClear.proto */ static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value); /* BufferStructDeclare.proto */ typedef struct { Py_ssize_t shape, strides, suboffsets; } __Pyx_Buf_DimInfo; typedef struct { size_t refcount; Py_buffer pybuffer; } __Pyx_Buffer; typedef struct { __Pyx_Buffer *rcbuffer; char *data; __Pyx_Buf_DimInfo diminfo[8]; } __Pyx_LocalBuf_ND; #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); static void __Pyx_ReleaseBuffer(Py_buffer *view); #else #define __Pyx_GetBuffer PyObject_GetBuffer #define __Pyx_ReleaseBuffer PyBuffer_Release #endif /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value); /* None.proto */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_pow___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* RealImag.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus #define __Pyx_CREAL(z) ((z).real()) #define __Pyx_CIMAG(z) ((z).imag()) #else #define __Pyx_CREAL(z) (__real__(z)) #define __Pyx_CIMAG(z) (__imag__(z)) #endif #else #define __Pyx_CREAL(z) ((z).real) #define __Pyx_CIMAG(z) ((z).imag) #endif #if defined(__cplusplus) && CYTHON_CCOMPLEX\ && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) #define __Pyx_SET_CREAL(z,x) ((z).real(x)) #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif /* Arithmetic.proto */ #if CYTHON_CCOMPLEX #define __Pyx_c_eq_float(a, b) ((a)==(b)) #define __Pyx_c_sum_float(a, b) ((a)+(b)) #define __Pyx_c_diff_float(a, b) ((a)-(b)) #define __Pyx_c_prod_float(a, b) ((a)*(b)) #define __Pyx_c_quot_float(a, b) ((a)/(b)) #define __Pyx_c_neg_float(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero_float(z) ((z)==(float)0) #define __Pyx_c_conj_float(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs_float(z) (::std::abs(z)) #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero_float(z) ((z)==0) #define __Pyx_c_conj_float(z) (conjf(z)) #if 1 #define __Pyx_c_abs_float(z) (cabsf(z)) #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif /* Arithmetic.proto */ #if CYTHON_CCOMPLEX #define __Pyx_c_eq_double(a, b) ((a)==(b)) #define __Pyx_c_sum_double(a, b) ((a)+(b)) #define __Pyx_c_diff_double(a, b) ((a)-(b)) #define __Pyx_c_prod_double(a, b) ((a)*(b)) #define __Pyx_c_quot_double(a, b) ((a)/(b)) #define __Pyx_c_neg_double(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero_double(z) ((z)==(double)0) #define __Pyx_c_conj_double(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs_double(z) (::std::abs(z)) #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero_double(z) ((z)==0) #define __Pyx_c_conj_double(z) (conj(z)) #if 1 #define __Pyx_c_abs_double(z) (cabs(z)) #define __Pyx_c_pow_double(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); /* CIntFromPy.proto */ static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); /* PyIdentifierFromString.proto */ #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif /* ModuleImport.proto */ static PyObject *__Pyx_ImportModule(const char *name); /* TypeImport.proto */ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); static struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_intersect(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y_, int __pyx_skip_dispatch); /* proto*/ static struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_make_union(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y_, int __pyx_skip_dispatch); /* proto*/ static __pyx_t_5numpy_int32_t __pyx_f_6pandas_5_libs_6sparse_8IntIndex_lookup(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_index, int __pyx_skip_dispatch); /* proto*/ static PyArrayObject *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_lookup_array(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_indexer, int __pyx_skip_dispatch); /* proto*/ static PyArrayObject *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_reindex(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other_, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_put(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyArrayObject *__pyx_v_indices, CYTHON_UNUSED PyObject *__pyx_v_to_put, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_take(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyArrayObject *__pyx_v_indices, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_check_integrity(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_intersect(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other, int __pyx_skip_dispatch); /* proto*/ static struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_make_union(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y, int __pyx_skip_dispatch); /* proto*/ static Py_ssize_t __pyx_f_6pandas_5_libs_6sparse_10BlockIndex_lookup(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, Py_ssize_t __pyx_v_index, int __pyx_skip_dispatch); /* proto*/ static PyArrayObject *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_lookup_array(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_indexer, int __pyx_skip_dispatch); /* proto*/ static PyArrayObject *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_reindex(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other_, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_put(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyArrayObject *__pyx_v_indices, CYTHON_UNUSED PyObject *__pyx_v_to_put, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_take(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyArrayObject *__pyx_v_indices, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockMerge__make_merged_blocks(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockMerge__set_current_indices(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_xi, __pyx_t_5numpy_int32_t __pyx_v_yi, int __pyx_v_mode); /* proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockUnion__make_merged_blocks(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *__pyx_v_self); /* proto*/ static __pyx_t_5numpy_int32_t __pyx_f_6pandas_5_libs_6sparse_10BlockUnion__find_next_block_end(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *__pyx_v_self, int __pyx_v_mode); /* proto*/ /* Module declarations from 'cython' */ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'numpy' */ /* Module declarations from 'numpy' */ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/ /* Module declarations from 'pandas._libs.sparse' */ static PyTypeObject *__pyx_ptype_6pandas_5_libs_6sparse_SparseIndex = 0; static PyTypeObject *__pyx_ptype_6pandas_5_libs_6sparse_IntIndex = 0; static PyTypeObject *__pyx_ptype_6pandas_5_libs_6sparse_BlockIndex = 0; static PyTypeObject *__pyx_ptype_6pandas_5_libs_6sparse_BlockMerge = 0; static PyTypeObject *__pyx_ptype_6pandas_5_libs_6sparse_BlockIntersection = 0; static PyTypeObject *__pyx_ptype_6pandas_5_libs_6sparse_BlockUnion = 0; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_5_libs_6sparse_NaN; static __pyx_t_5numpy_float64_t __pyx_v_6pandas_5_libs_6sparse_INF; static PyObject *__pyx_f_6pandas_5_libs_6sparse_get_blocks(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___div_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___truediv_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___floordiv_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___mod_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___div_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___truediv_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5_libs_6sparse___floordiv_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5_libs_6sparse___mod_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_add_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_add_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_add_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_add_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_add_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_add_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_add_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_add_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_sub_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_sub_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_sub_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_sub_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_sub_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_sub_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_sub_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_sub_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_mul_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_mul_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_mul_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_mul_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_mul_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_mul_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_mul_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_mul_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_div_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_div_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_div_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_div_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_div_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_div_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_div_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_div_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_mod_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_mod_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_mod_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_mod_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_mod_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_mod_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_mod_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_mod_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_truediv_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_truediv_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_truediv_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_truediv_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_truediv_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_truediv_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_truediv_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_truediv_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_floordiv_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_floordiv_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_floordiv_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_floordiv_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_floordiv_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_floordiv_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_floordiv_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_floordiv_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_pow_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_pow_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_pow_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_pow_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_pow_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_pow_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_pow_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_pow_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_eq_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_eq_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_eq_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_eq_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_eq_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_eq_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_eq_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_eq_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_ne_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_ne_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_ne_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_ne_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_ne_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_ne_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_ne_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_ne_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_lt_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_lt_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_lt_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_lt_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_lt_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_lt_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_lt_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_lt_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_gt_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_gt_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_gt_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_gt_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_gt_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_gt_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_gt_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_gt_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_le_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_le_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_le_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_le_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_le_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_le_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_le_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_le_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_ge_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_ge_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_float64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_ge_float64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_ge_float64(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_ge_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_ge_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_ge_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_ge_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_and_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_and_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_and_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_and_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_and_uint8(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_uint8_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_uint8_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_and_uint8(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_uint8_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_uint8_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_and_uint8(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_uint8_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_uint8_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_and_uint8(__pyx_t_5numpy_uint8_t, __pyx_t_5numpy_uint8_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_or_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_or_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_int64_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_or_int64(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_or_int64(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_or_uint8(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_uint8_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, __pyx_t_5numpy_uint8_t); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_or_uint8(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_uint8_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, __pyx_t_5numpy_uint8_t); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_or_uint8(PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_uint8_t, PyArrayObject *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, __pyx_t_5numpy_uint8_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_or_uint8(__pyx_t_5numpy_uint8_t, __pyx_t_5numpy_uint8_t, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_SparseIndex__set_state(struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockMerge__set_state(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockIntersection__set_state(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *, PyObject *); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockUnion__set_state(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *, PyObject *); /*proto*/ static __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 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t = { "uint8_t", NULL, sizeof(__pyx_t_5numpy_uint8_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint8_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint8_t), 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int64_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int64_t), 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_object = { "Python object", NULL, sizeof(PyObject *), { 0 }, 0, 'O', 0, 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t = { "int8_t", NULL, sizeof(__pyx_t_5numpy_int8_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int8_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int8_t), 0 }; #define __Pyx_MODULE_NAME "pandas._libs.sparse" extern int __pyx_module_is_main_pandas___libs__sparse; int __pyx_module_is_main_pandas___libs__sparse = 0; /* Implementation of 'pandas._libs.sparse' */ static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_min; static PyObject *__pyx_builtin_max; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_ImportError; static const char __pyx_k_i[] = "i"; static const char __pyx_k_x[] = "x"; static const char __pyx_k_y[] = "y"; static const char __pyx_k_np[] = "np"; static const char __pyx_k_NaN[] = "NaN"; static const char __pyx_k_act[] = "act"; static const char __pyx_k_arr[] = "arr"; static const char __pyx_k_exp[] = "exp"; static const char __pyx_k_idx[] = "idx"; static const char __pyx_k_inf[] = "inf"; static const char __pyx_k_max[] = "max"; static const char __pyx_k_min[] = "min"; static const char __pyx_k_new[] = "__new__"; static const char __pyx_k_put[] = "put"; static const char __pyx_k_sum[] = "sum"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_1_10[] = "1.10"; static const char __pyx_k_1_11[] = "1.11"; static const char __pyx_k_bool[] = "bool"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_fill[] = "fill"; static const char __pyx_k_int8[] = "int8"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_mask[] = "mask"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_ones[] = "ones"; static const char __pyx_k_take[] = "take"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_view[] = "view"; static const char __pyx_k_array[] = "array"; static const char __pyx_k_blocs[] = "blocs"; static const char __pyx_k_dtype[] = "dtype"; static const char __pyx_k_empty[] = "empty"; static const char __pyx_k_int32[] = "int32"; static const char __pyx_k_int64[] = "int64"; static const char __pyx_k_numpy[] = "numpy"; static const char __pyx_k_other[] = "other_"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_uint8[] = "uint8"; static const char __pyx_k_value[] = "value"; static const char __pyx_k_xfill[] = "xfill"; static const char __pyx_k_yfill[] = "yfill"; static const char __pyx_k_astype[] = "astype"; static const char __pyx_k_format[] = "format"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_length[] = "length"; static const char __pyx_k_lookup[] = "lookup"; static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_to_put[] = "to_put"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_values[] = "values"; static const char __pyx_k_xindex[] = "xindex"; static const char __pyx_k_yindex[] = "yindex"; static const char __pyx_k_float64[] = "float64"; static const char __pyx_k_indexer[] = "indexer"; static const char __pyx_k_indices[] = "indices"; static const char __pyx_k_reindex[] = "reindex"; static const char __pyx_k_union1d[] = "union1d"; static const char __pyx_k_version[] = "version"; static const char __pyx_k_IntIndex[] = "IntIndex\n"; static const char __pyx_k_blengths[] = "blengths"; static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_operator[] = "operator"; static const char __pyx_k_pyx_type[] = "__pyx_type"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_Indices_s[] = "Indices: %s\n"; static const char __pyx_k_index_map[] = "index_map"; static const char __pyx_k_intersect[] = "intersect"; static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_BlockIndex[] = "BlockIndex\n"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_fill_value[] = "fill_value"; static const char __pyx_k_make_union[] = "make_union"; static const char __pyx_k_new_length[] = "new_length"; static const char __pyx_k_np_version[] = "_np_version"; static const char __pyx_k_pyx_result[] = "__pyx_result"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static const char __pyx_k_ImportError[] = "ImportError"; static const char __pyx_k_PickleError[] = "PickleError"; static const char __pyx_k_array_equal[] = "array_equal"; static const char __pyx_k_LooseVersion[] = "LooseVersion"; static const char __pyx_k_RuntimeError[] = "RuntimeError"; static const char __pyx_k_lookup_array[] = "lookup_array"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; static const char __pyx_k_searchsorted[] = "searchsorted"; static const char __pyx_k_sparse_index[] = "sparse_index"; static const char __pyx_k_stringsource[] = "stringsource"; static const char __pyx_k_to_int_index[] = "to_int_index"; static const char __pyx_k_get_reindexer[] = "get_reindexer"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; static const char __pyx_k_short_version[] = "short_version"; static const char __pyx_k_to_block_index[] = "to_block_index"; static const char __pyx_k_Block_lengths_s[] = "Block lengths: %s"; static const char __pyx_k_check_integrity[] = "check_integrity"; static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; static const char __pyx_k_reindex_integer[] = "reindex_integer"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_Block_d_overlaps[] = "Block %d overlaps"; static const char __pyx_k_Block_locations_s[] = "Block locations: %s\n"; static const char __pyx_k_ascontiguousarray[] = "ascontiguousarray"; static const char __pyx_k_distutils_version[] = "distutils.version"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_Mode_must_be_0_or_1[] = "Mode must be 0 or 1"; static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; static const char __pyx_k_Zero_length_block_d[] = "Zero-length block %d"; static const char __pyx_k_pandas__libs_sparse[] = "pandas._libs.sparse"; static const char __pyx_k_np_version_under1p10[] = "_np_version_under1p10"; static const char __pyx_k_np_version_under1p11[] = "_np_version_under1p11"; static const char __pyx_k_pandas__libs_sparse_pyx[] = "pandas/_libs/sparse.pyx"; static const char __pyx_k_pyx_unpickle_BlockMerge[] = "__pyx_unpickle_BlockMerge"; static const char __pyx_k_pyx_unpickle_BlockUnion[] = "__pyx_unpickle_BlockUnion"; static const char __pyx_k_make_mask_object_ndarray[] = "make_mask_object_ndarray"; static const char __pyx_k_pyx_unpickle_SparseIndex[] = "__pyx_unpickle_SparseIndex"; static const char __pyx_k_Block_d_extends_beyond_end[] = "Block %d extends beyond end"; static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static const char __pyx_k_No_index_can_be_less_than_zero[] = "No index can be less than zero"; static const char __pyx_k_pyx_unpickle_BlockIntersection[] = "__pyx_unpickle_BlockIntersection"; static const char __pyx_k_block_bound_arrays_must_be_same[] = "block bound arrays must be same length"; static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static const char __pyx_k_All_indices_must_be_less_than_th[] = "All indices must be less than the length"; static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static const char __pyx_k_Incompatible_checksums_s_vs_0x0c[] = "Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xd4[] = "Incompatible checksums (%s vs 0xd41d8cd = ())"; static const char __pyx_k_Indices_must_be_strictly_increas[] = "Indices must be strictly increasing"; static const char __pyx_k_Indices_must_reference_same_unde[] = "Indices must reference same underlying length"; static const char __pyx_k_Locations_not_in_ascending_order[] = "Locations not in ascending order"; static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static const char __pyx_k_Too_many_indices_Expected_exp_bu[] = "Too many indices. Expected {exp} but found {act}"; static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static PyObject *__pyx_kp_s_1_10; static PyObject *__pyx_kp_s_1_11; static PyObject *__pyx_kp_s_All_indices_must_be_less_than_th; static PyObject *__pyx_n_s_BlockIndex; static PyObject *__pyx_kp_s_Block_d_extends_beyond_end; static PyObject *__pyx_kp_s_Block_d_overlaps; static PyObject *__pyx_kp_s_Block_lengths_s; static PyObject *__pyx_kp_s_Block_locations_s; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; static PyObject *__pyx_n_s_ImportError; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x0c; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd4; static PyObject *__pyx_kp_s_Indices_must_be_strictly_increas; static PyObject *__pyx_kp_s_Indices_must_reference_same_unde; static PyObject *__pyx_kp_s_Indices_s; static PyObject *__pyx_n_s_IntIndex; static PyObject *__pyx_kp_s_Locations_not_in_ascending_order; static PyObject *__pyx_n_s_LooseVersion; static PyObject *__pyx_kp_s_Mode_must_be_0_or_1; static PyObject *__pyx_n_s_NaN; static PyObject *__pyx_kp_s_No_index_can_be_less_than_zero; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_n_s_PickleError; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_kp_s_Too_many_indices_Expected_exp_bu; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_kp_s_Zero_length_block_d; static PyObject *__pyx_n_s_act; static PyObject *__pyx_n_s_arr; static PyObject *__pyx_n_s_array; static PyObject *__pyx_n_s_array_equal; static PyObject *__pyx_n_s_ascontiguousarray; static PyObject *__pyx_n_s_astype; static PyObject *__pyx_n_s_blengths; static PyObject *__pyx_kp_s_block_bound_arrays_must_be_same; static PyObject *__pyx_n_s_blocs; static PyObject *__pyx_n_s_bool; static PyObject *__pyx_n_s_check_integrity; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_dict; static PyObject *__pyx_n_s_distutils_version; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_empty; static PyObject *__pyx_n_s_exp; static PyObject *__pyx_n_s_fill; static PyObject *__pyx_n_s_fill_value; static PyObject *__pyx_n_s_float64; static PyObject *__pyx_n_s_format; static PyObject *__pyx_n_s_get_reindexer; static PyObject *__pyx_n_s_getstate; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_idx; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_index_map; static PyObject *__pyx_n_s_indexer; static PyObject *__pyx_n_s_indices; static PyObject *__pyx_n_s_inf; static PyObject *__pyx_n_s_int32; static PyObject *__pyx_n_s_int64; static PyObject *__pyx_n_s_int8; static PyObject *__pyx_n_s_intersect; static PyObject *__pyx_n_s_length; static PyObject *__pyx_n_s_lookup; static PyObject *__pyx_n_s_lookup_array; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_make_mask_object_ndarray; static PyObject *__pyx_n_s_make_union; static PyObject *__pyx_n_s_mask; static PyObject *__pyx_n_s_max; static PyObject *__pyx_n_s_min; static PyObject *__pyx_n_s_name; static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; static PyObject *__pyx_n_s_new; static PyObject *__pyx_n_s_new_length; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_s_np_version; static PyObject *__pyx_n_s_np_version_under1p10; static PyObject *__pyx_n_s_np_version_under1p11; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; static PyObject *__pyx_n_s_ones; static PyObject *__pyx_n_s_operator; static PyObject *__pyx_n_s_other; static PyObject *__pyx_n_s_pandas__libs_sparse; static PyObject *__pyx_kp_s_pandas__libs_sparse_pyx; static PyObject *__pyx_n_s_pickle; static PyObject *__pyx_n_s_put; static PyObject *__pyx_n_s_pyx_PickleError; static PyObject *__pyx_n_s_pyx_checksum; static PyObject *__pyx_n_s_pyx_result; static PyObject *__pyx_n_s_pyx_state; static PyObject *__pyx_n_s_pyx_type; static PyObject *__pyx_n_s_pyx_unpickle_BlockIntersection; static PyObject *__pyx_n_s_pyx_unpickle_BlockMerge; static PyObject *__pyx_n_s_pyx_unpickle_BlockUnion; static PyObject *__pyx_n_s_pyx_unpickle_SparseIndex; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_reduce; static PyObject *__pyx_n_s_reduce_cython; static PyObject *__pyx_n_s_reduce_ex; static PyObject *__pyx_n_s_reindex; static PyObject *__pyx_n_s_reindex_integer; static PyObject *__pyx_n_s_searchsorted; static PyObject *__pyx_n_s_setstate; static PyObject *__pyx_n_s_setstate_cython; static PyObject *__pyx_n_s_short_version; static PyObject *__pyx_n_s_sparse_index; static PyObject *__pyx_kp_s_stringsource; static PyObject *__pyx_n_s_sum; static PyObject *__pyx_n_s_sys; static PyObject *__pyx_n_s_take; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_to_block_index; static PyObject *__pyx_n_s_to_int_index; static PyObject *__pyx_n_s_to_put; static PyObject *__pyx_n_s_uint8; static PyObject *__pyx_n_s_union1d; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_update; static PyObject *__pyx_n_s_value; static PyObject *__pyx_n_s_values; static PyObject *__pyx_n_s_version; static PyObject *__pyx_n_s_view; static PyObject *__pyx_n_s_x; static PyObject *__pyx_n_s_xfill; static PyObject *__pyx_n_s_xindex; static PyObject *__pyx_n_s_y; static PyObject *__pyx_n_s_yfill; static PyObject *__pyx_n_s_yindex; static int __pyx_pf_6pandas_5_libs_6sparse_11SparseIndex___init__(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_11SparseIndex_2__reduce_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_11SparseIndex_4__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6pandas_5_libs_6sparse_8IntIndex___init__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_length, PyObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_2__reduce__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_4__repr__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_6check_integrity(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_8equals(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_5ngaps___get__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_10to_int_index(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_12to_block_index(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_14intersect(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y_); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_16make_union(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y_); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_18lookup(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_20lookup_array(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_indexer); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_22reindex(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other_); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_24put(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices, PyObject *__pyx_v_to_put); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_26take(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_6length___get__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_7npoints___get__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_7indices___get__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_get_blocks(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices); /* proto */ static int __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex___init__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyObject *__pyx_v_length, PyObject *__pyx_v_blocs, PyObject *__pyx_v_blengths); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_2__reduce__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_4__repr__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_5ngaps___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_6check_integrity(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_8equals(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_10to_block_index(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_12to_int_index(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_14intersect(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_16make_union(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_18lookup(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, Py_ssize_t __pyx_v_index); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_20lookup_array(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_indexer); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_22reindex(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other_); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_24put(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices, PyObject *__pyx_v_to_put); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_26take(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_7nblocks___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_7npoints___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_6length___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_5blocs___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_8blengths___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self); /* proto */ static int __pyx_pf_6pandas_5_libs_6sparse_10BlockMerge___init__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockMerge_2__reduce_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockMerge_4__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_17BlockIntersection___reduce_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_17BlockIntersection_2__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockUnion___reduce_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockUnion_2__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_2sparse_add_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_4sparse_fill_add_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_6sparse_add_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8sparse_fill_add_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10sparse_sub_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_12sparse_fill_sub_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_14sparse_sub_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_16sparse_fill_sub_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_18sparse_mul_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_20sparse_fill_mul_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_22sparse_mul_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_24sparse_fill_mul_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_26sparse_div_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_28sparse_fill_div_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_30sparse_div_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_32sparse_fill_div_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_34sparse_mod_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_36sparse_fill_mod_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_38sparse_mod_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_40sparse_fill_mod_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_42sparse_truediv_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_44sparse_fill_truediv_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_46sparse_truediv_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_48sparse_fill_truediv_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_50sparse_floordiv_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_52sparse_fill_floordiv_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_54sparse_floordiv_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_56sparse_fill_floordiv_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_58sparse_pow_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_60sparse_fill_pow_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_62sparse_pow_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_64sparse_fill_pow_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_66sparse_eq_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_68sparse_fill_eq_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_70sparse_eq_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_72sparse_fill_eq_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_74sparse_ne_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_76sparse_fill_ne_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_78sparse_ne_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_80sparse_fill_ne_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_82sparse_lt_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_84sparse_fill_lt_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_86sparse_lt_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_88sparse_fill_lt_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_90sparse_gt_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_92sparse_fill_gt_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_94sparse_gt_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_96sparse_fill_gt_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_98sparse_le_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_100sparse_fill_le_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_102sparse_le_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_104sparse_fill_le_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_106sparse_ge_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_108sparse_fill_ge_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_110sparse_ge_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_112sparse_fill_ge_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_114sparse_and_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_116sparse_fill_and_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_118sparse_and_uint8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_uint8_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_uint8_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_120sparse_fill_and_uint8(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_uint8_t __pyx_v_xfill, __pyx_t_5numpy_uint8_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_122sparse_or_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_124sparse_fill_or_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_126sparse_or_uint8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_uint8_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_uint8_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_128sparse_fill_or_uint8(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_uint8_t __pyx_v_xfill, __pyx_t_5numpy_uint8_t __pyx_v_yfill); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_130get_reindexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_index_map); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_132reindex_integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_sparse_index, CYTHON_UNUSED PyArrayObject *__pyx_v_indexer); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_134make_mask_object_ndarray(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_fill_value); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_136__pyx_unpickle_SparseIndex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_138__pyx_unpickle_BlockMerge(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_140__pyx_unpickle_BlockIntersection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6pandas_5_libs_6sparse_142__pyx_unpickle_BlockUnion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_SparseIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_IntIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_BlockIndex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_BlockMerge(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_BlockIntersection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_BlockUnion(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_13526932; static PyObject *__pyx_int_222419149; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__21; static PyObject *__pyx_tuple__22; static PyObject *__pyx_tuple__23; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__30; static PyObject *__pyx_tuple__32; static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__36; static PyObject *__pyx_codeobj__25; static PyObject *__pyx_codeobj__27; static PyObject *__pyx_codeobj__29; static PyObject *__pyx_codeobj__31; static PyObject *__pyx_codeobj__33; static PyObject *__pyx_codeobj__35; static PyObject *__pyx_codeobj__37; /* Late includes */ /* "pandas/_libs/sparse.pyx":28 * cdef float64_t INF = np.inf * * cdef inline int int_max(int a, int b): return a if a >= b else b # <<<<<<<<<<<<<< * cdef inline int int_min(int a, int b): return a if a <= b else b * */ static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6sparse_int_max(int __pyx_v_a, int __pyx_v_b) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("int_max", 0); if (((__pyx_v_a >= __pyx_v_b) != 0)) { __pyx_t_1 = __pyx_v_a; } else { __pyx_t_1 = __pyx_v_b; } __pyx_r = __pyx_t_1; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":29 * * cdef inline int int_max(int a, int b): return a if a >= b else b * cdef inline int int_min(int a, int b): return a if a <= b else b # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ static CYTHON_INLINE int __pyx_f_6pandas_5_libs_6sparse_int_min(int __pyx_v_a, int __pyx_v_b) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("int_min", 0); if (((__pyx_v_a <= __pyx_v_b) != 0)) { __pyx_t_1 = __pyx_v_a; } else { __pyx_t_1 = __pyx_v_b; } __pyx_r = __pyx_t_1; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":39 * """ * * def __init__(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static int __pyx_pw_6pandas_5_libs_6sparse_11SparseIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_5_libs_6sparse_11SparseIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_11SparseIndex___init__(((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5_libs_6sparse_11SparseIndex___init__(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/_libs/sparse.pyx":40 * * def __init__(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(0, 40, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":39 * """ * * def __init__(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pandas._libs.sparse.SparseIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef bint use_setstate * state = () */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_11SparseIndex_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_11SparseIndex_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_11SparseIndex_2__reduce_cython__(((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_11SparseIndex_2__reduce_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_self) { int __pyx_v_use_setstate; PyObject *__pyx_v_state = NULL; PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":3 * def __reduce_cython__(self): * cdef bint use_setstate * state = () # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_state = __pyx_empty_tuple; /* "(tree fragment)":4 * cdef bint use_setstate * state = () * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":5 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_2 = (__pyx_v__dict != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "(tree fragment)":6 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":7 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = False */ __pyx_v_use_setstate = 1; /* "(tree fragment)":5 * state = () * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":9 * use_setstate = True * else: * use_setstate = False # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_SparseIndex, (type(self), 0xd41d8cd, None), state */ /*else*/ { __pyx_v_use_setstate = 0; } __pyx_L3:; /* "(tree fragment)":10 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_SparseIndex, (type(self), 0xd41d8cd, None), state * else: */ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { /* "(tree fragment)":11 * use_setstate = False * if use_setstate: * return __pyx_unpickle_SparseIndex, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_SparseIndex, (type(self), 0xd41d8cd, state) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SparseIndex); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":10 * else: * use_setstate = False * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_SparseIndex, (type(self), 0xd41d8cd, None), state * else: */ } /* "(tree fragment)":13 * return __pyx_unpickle_SparseIndex, (type(self), 0xd41d8cd, None), state * else: * return __pyx_unpickle_SparseIndex, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_SparseIndex__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SparseIndex); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_222419149); __Pyx_GIVEREF(__pyx_int_222419149); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef bint use_setstate * state = () */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas._libs.sparse.SparseIndex.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":14 * else: * return __pyx_unpickle_SparseIndex, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_SparseIndex__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_11SparseIndex_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_11SparseIndex_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_11SparseIndex_4__setstate_cython__(((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_11SparseIndex_4__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":15 * return __pyx_unpickle_SparseIndex, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_SparseIndex__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 15, __pyx_L1_error) __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_SparseIndex__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":14 * else: * return __pyx_unpickle_SparseIndex, (type(self), 0xd41d8cd, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_SparseIndex__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.SparseIndex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":58 * ndarray indices * * def __init__(self, Py_ssize_t length, indices): # <<<<<<<<<<<<<< * self.length = length * self.indices = np.ascontiguousarray(indices, dtype=np.int32) */ /* Python wrapper */ static int __pyx_pw_6pandas_5_libs_6sparse_8IntIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_5_libs_6sparse_8IntIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { Py_ssize_t __pyx_v_length; PyObject *__pyx_v_indices = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_length,&__pyx_n_s_indices,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 58, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 58, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_length = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_length == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L3_error) __pyx_v_indices = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 58, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex___init__(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self), __pyx_v_length, __pyx_v_indices); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5_libs_6sparse_8IntIndex___init__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_length, PyObject *__pyx_v_indices) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/_libs/sparse.pyx":59 * * def __init__(self, Py_ssize_t length, indices): * self.length = length # <<<<<<<<<<<<<< * self.indices = np.ascontiguousarray(indices, dtype=np.int32) * self.npoints = len(self.indices) */ __pyx_v_self->length = __pyx_v_length; /* "pandas/_libs/sparse.pyx":60 * def __init__(self, Py_ssize_t length, indices): * self.length = length * self.indices = np.ascontiguousarray(indices, dtype=np.int32) # <<<<<<<<<<<<<< * self.npoints = len(self.indices) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_indices); __Pyx_GIVEREF(__pyx_v_indices); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_indices); __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->indices); __Pyx_DECREF(((PyObject *)__pyx_v_self->indices)); __pyx_v_self->indices = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":61 * self.length = length * self.indices = np.ascontiguousarray(indices, dtype=np.int32) * self.npoints = len(self.indices) # <<<<<<<<<<<<<< * * self.check_integrity() */ __pyx_t_5 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->npoints = __pyx_t_6; /* "pandas/_libs/sparse.pyx":63 * self.npoints = len(self.indices) * * self.check_integrity() # <<<<<<<<<<<<<< * * def __reduce__(self): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_integrity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_1) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 63, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":58 * ndarray indices * * def __init__(self, Py_ssize_t length, indices): # <<<<<<<<<<<<<< * self.length = length * self.indices = np.ascontiguousarray(indices, dtype=np.int32) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":65 * self.check_integrity() * * def __reduce__(self): # <<<<<<<<<<<<<< * args = (self.length, self.indices) * return IntIndex, args */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_2__reduce__(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_2__reduce__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_v_args = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); /* "pandas/_libs/sparse.pyx":66 * * def __reduce__(self): * args = (self.length, self.indices) # <<<<<<<<<<<<<< * return IntIndex, args * */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->indices)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->indices)); __pyx_t_1 = 0; __pyx_v_args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":67 * def __reduce__(self): * args = (self.length, self.indices) * return IntIndex, args # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_IntIndex)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_IntIndex)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_IntIndex)); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_args); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":65 * self.check_integrity() * * def __reduce__(self): # <<<<<<<<<<<<<< * args = (self.length, self.indices) * return IntIndex, args */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":69 * return IntIndex, args * * def __repr__(self): # <<<<<<<<<<<<<< * output = 'IntIndex\n' * output += 'Indices: %s\n' % repr(self.indices) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_4__repr__(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_4__repr__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_v_output = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); /* "pandas/_libs/sparse.pyx":70 * * def __repr__(self): * output = 'IntIndex\n' # <<<<<<<<<<<<<< * output += 'Indices: %s\n' % repr(self.indices) * return output */ __Pyx_INCREF(__pyx_n_s_IntIndex); __pyx_v_output = __pyx_n_s_IntIndex; /* "pandas/_libs/sparse.pyx":71 * def __repr__(self): * output = 'IntIndex\n' * output += 'Indices: %s\n' % repr(self.indices) # <<<<<<<<<<<<<< * return output * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Indices_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_output, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_output, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":72 * output = 'IntIndex\n' * output += 'Indices: %s\n' % repr(self.indices) * return output # <<<<<<<<<<<<<< * * def check_integrity(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_output); __pyx_r = __pyx_v_output; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":69 * return IntIndex, args * * def __repr__(self): # <<<<<<<<<<<<<< * output = 'IntIndex\n' * output += 'Indices: %s\n' % repr(self.indices) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":74 * return output * * def check_integrity(self): # <<<<<<<<<<<<<< * """ * Checks the following: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_7check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6pandas_5_libs_6sparse_8IntIndex_6check_integrity[] = "\n Checks the following:\n\n - Indices are strictly ascending\n - Number of indices is at most self.length\n - Indices are at least 0 and at most the total length less one\n\n A ValueError is raised if any of these conditions is violated.\n "; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_7check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("check_integrity (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_6check_integrity(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_6check_integrity(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self) { __pyx_t_5numpy_int32_t __pyx_v_index; __pyx_t_5numpy_int32_t __pyx_v_prev; PyObject *__pyx_v_msg = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); __pyx_t_5numpy_int32_t __pyx_t_7; int __pyx_t_8; __Pyx_RefNannySetupContext("check_integrity", 0); /* "pandas/_libs/sparse.pyx":86 * * cdef: * int32_t index, prev = -1 # <<<<<<<<<<<<<< * * if self.npoints > self.length: */ __pyx_v_prev = -1; /* "pandas/_libs/sparse.pyx":88 * int32_t index, prev = -1 * * if self.npoints > self.length: # <<<<<<<<<<<<<< * msg = ("Too many indices. Expected " * "{exp} but found {act}").format( */ __pyx_t_1 = ((__pyx_v_self->npoints > __pyx_v_self->length) != 0); if (unlikely(__pyx_t_1)) { /* "pandas/_libs/sparse.pyx":90 * if self.npoints > self.length: * msg = ("Too many indices. Expected " * "{exp} but found {act}").format( # <<<<<<<<<<<<<< * exp=self.length, act=self.npoints) * raise ValueError(msg) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Too_many_indices_Expected_exp_bu, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "pandas/_libs/sparse.pyx":91 * msg = ("Too many indices. Expected " * "{exp} but found {act}").format( * exp=self.length, act=self.npoints) # <<<<<<<<<<<<<< * raise ValueError(msg) * */ __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_exp, __pyx_t_4) < 0) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->npoints); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_act, __pyx_t_4) < 0) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":90 * if self.npoints > self.length: * msg = ("Too many indices. Expected " * "{exp} but found {act}").format( # <<<<<<<<<<<<<< * exp=self.length, act=self.npoints) * raise ValueError(msg) */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_msg = __pyx_t_4; __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":92 * "{exp} but found {act}").format( * exp=self.length, act=self.npoints) * raise ValueError(msg) # <<<<<<<<<<<<<< * * # Indices are vacuously ordered and non-negative */ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_v_msg); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 92, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":88 * int32_t index, prev = -1 * * if self.npoints > self.length: # <<<<<<<<<<<<<< * msg = ("Too many indices. Expected " * "{exp} but found {act}").format( */ } /* "pandas/_libs/sparse.pyx":96 * # Indices are vacuously ordered and non-negative * # if the sequence of indices is empty. * if self.npoints == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_v_self->npoints == 0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse.pyx":97 * # if the sequence of indices is empty. * if self.npoints == 0: * return # <<<<<<<<<<<<<< * * if min(self.indices) < 0: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "pandas/_libs/sparse.pyx":96 * # Indices are vacuously ordered and non-negative * # if the sequence of indices is empty. * if self.npoints == 0: # <<<<<<<<<<<<<< * return * */ } /* "pandas/_libs/sparse.pyx":99 * return * * if min(self.indices) < 0: # <<<<<<<<<<<<<< * raise ValueError("No index can be less than zero") * */ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, ((PyObject *)__pyx_v_self->indices)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_1)) { /* "pandas/_libs/sparse.pyx":100 * * if min(self.indices) < 0: * raise ValueError("No index can be less than zero") # <<<<<<<<<<<<<< * * if max(self.indices) >= self.length: */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 100, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":99 * return * * if min(self.indices) < 0: # <<<<<<<<<<<<<< * raise ValueError("No index can be less than zero") * */ } /* "pandas/_libs/sparse.pyx":102 * raise ValueError("No index can be less than zero") * * if max(self.indices) >= self.length: # <<<<<<<<<<<<<< * raise ValueError("All indices must be less than the length") * */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_self->indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_1)) { /* "pandas/_libs/sparse.pyx":103 * * if max(self.indices) >= self.length: * raise ValueError("All indices must be less than the length") # <<<<<<<<<<<<<< * * for index in self.indices: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 103, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":102 * raise ValueError("No index can be less than zero") * * if max(self.indices) >= self.length: # <<<<<<<<<<<<<< * raise ValueError("All indices must be less than the length") * */ } /* "pandas/_libs/sparse.pyx":105 * raise ValueError("All indices must be less than the length") * * for index in self.indices: # <<<<<<<<<<<<<< * if prev != -1 and index <= prev: * raise ValueError("Indices must be strictly increasing") */ if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->indices))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->indices))) { __pyx_t_2 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 105, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 105, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 105, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 105, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __pyx_t_7 = __Pyx_PyInt_As_npy_int32(__pyx_t_4); if (unlikely((__pyx_t_7 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_index = __pyx_t_7; /* "pandas/_libs/sparse.pyx":106 * * for index in self.indices: * if prev != -1 and index <= prev: # <<<<<<<<<<<<<< * raise ValueError("Indices must be strictly increasing") * */ __pyx_t_8 = ((__pyx_v_prev != -1L) != 0); if (__pyx_t_8) { } else { __pyx_t_1 = __pyx_t_8; goto __pyx_L10_bool_binop_done; } __pyx_t_8 = ((__pyx_v_index <= __pyx_v_prev) != 0); __pyx_t_1 = __pyx_t_8; __pyx_L10_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* "pandas/_libs/sparse.pyx":107 * for index in self.indices: * if prev != -1 and index <= prev: * raise ValueError("Indices must be strictly increasing") # <<<<<<<<<<<<<< * * prev = index */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 107, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":106 * * for index in self.indices: * if prev != -1 and index <= prev: # <<<<<<<<<<<<<< * raise ValueError("Indices must be strictly increasing") * */ } /* "pandas/_libs/sparse.pyx":109 * raise ValueError("Indices must be strictly increasing") * * prev = index # <<<<<<<<<<<<<< * * def equals(self, other): */ __pyx_v_prev = __pyx_v_index; /* "pandas/_libs/sparse.pyx":105 * raise ValueError("All indices must be less than the length") * * for index in self.indices: # <<<<<<<<<<<<<< * if prev != -1 and index <= prev: * raise ValueError("Indices must be strictly increasing") */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":74 * return output * * def check_integrity(self): # <<<<<<<<<<<<<< * """ * Checks the following: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.check_integrity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":111 * prev = index * * def equals(self, other): # <<<<<<<<<<<<<< * if not isinstance(other, IntIndex): * return False */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_9equals(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_9equals(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("equals (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_8equals(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_8equals(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_same_length = NULL; PyObject *__pyx_v_same_indices = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("equals", 0); /* "pandas/_libs/sparse.pyx":112 * * def equals(self, other): * if not isinstance(other, IntIndex): # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse.pyx":113 * def equals(self, other): * if not isinstance(other, IntIndex): * return False # <<<<<<<<<<<<<< * * if self is other: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":112 * * def equals(self, other): * if not isinstance(other, IntIndex): # <<<<<<<<<<<<<< * return False * */ } /* "pandas/_libs/sparse.pyx":115 * return False * * if self is other: # <<<<<<<<<<<<<< * return True * */ __pyx_t_2 = (((PyObject *)__pyx_v_self) == __pyx_v_other); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse.pyx":116 * * if self is other: * return True # <<<<<<<<<<<<<< * * same_length = self.length == other.length */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":115 * return False * * if self is other: # <<<<<<<<<<<<<< * return True * */ } /* "pandas/_libs/sparse.pyx":118 * return True * * same_length = self.length == other.length # <<<<<<<<<<<<<< * same_indices = np.array_equal(self.indices, other.indices) * return same_length and same_indices */ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_same_length = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":119 * * same_length = self.length == other.length * same_indices = np.array_equal(self.indices, other.indices) # <<<<<<<<<<<<<< * return same_length and same_indices * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array_equal); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_indices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self->indices), __pyx_t_4}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self->indices), __pyx_t_4}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self->indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->indices)); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, ((PyObject *)__pyx_v_self->indices)); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_same_indices = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":120 * same_length = self.length == other.length * same_indices = np.array_equal(self.indices, other.indices) * return same_length and same_indices # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_same_length); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 120, __pyx_L1_error) if (__pyx_t_1) { } else { __Pyx_INCREF(__pyx_v_same_length); __pyx_t_5 = __pyx_v_same_length; goto __pyx_L5_bool_binop_done; } __Pyx_INCREF(__pyx_v_same_indices); __pyx_t_5 = __pyx_v_same_indices; __pyx_L5_bool_binop_done:; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":111 * prev = index * * def equals(self, other): # <<<<<<<<<<<<<< * if not isinstance(other, IntIndex): * return False */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.equals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_same_length); __Pyx_XDECREF(__pyx_v_same_indices); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":123 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_5ngaps_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_5ngaps_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_5ngaps___get__(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_5ngaps___get__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/_libs/sparse.pyx":124 * @property * def ngaps(self): * return self.length - self.npoints # <<<<<<<<<<<<<< * * def to_int_index(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t((__pyx_v_self->length - __pyx_v_self->npoints)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":123 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.ngaps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":126 * return self.length - self.npoints * * def to_int_index(self): # <<<<<<<<<<<<<< * return self * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_11to_int_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_11to_int_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_int_index (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_10to_int_index(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_10to_int_index(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_int_index", 0); /* "pandas/_libs/sparse.pyx":127 * * def to_int_index(self): * return self # <<<<<<<<<<<<<< * * def to_block_index(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "pandas/_libs/sparse.pyx":126 * return self.length - self.npoints * * def to_int_index(self): # <<<<<<<<<<<<<< * return self * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":129 * return self * * def to_block_index(self): # <<<<<<<<<<<<<< * locs, lens = get_blocks(self.indices) * return BlockIndex(self.length, locs, lens) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_13to_block_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_13to_block_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_block_index (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_12to_block_index(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_12to_block_index(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_v_locs = NULL; PyObject *__pyx_v_lens = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); __Pyx_RefNannySetupContext("to_block_index", 0); /* "pandas/_libs/sparse.pyx":130 * * def to_block_index(self): * locs, lens = get_blocks(self.indices) # <<<<<<<<<<<<<< * return BlockIndex(self.length, locs, lens) * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6pandas_5_libs_6sparse_get_blocks(((PyArrayObject *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 130, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 130, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 130, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_locs = __pyx_t_1; __pyx_t_1 = 0; __pyx_v_lens = __pyx_t_3; __pyx_t_3 = 0; /* "pandas/_libs/sparse.pyx":131 * def to_block_index(self): * locs, lens = get_blocks(self.indices) * return BlockIndex(self.length, locs, lens) # <<<<<<<<<<<<<< * * cpdef IntIndex intersect(self, SparseIndex y_): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_INCREF(__pyx_v_locs); __Pyx_GIVEREF(__pyx_v_locs); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_locs); __Pyx_INCREF(__pyx_v_lens); __Pyx_GIVEREF(__pyx_v_lens); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_lens); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_BlockIndex), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":129 * return self * * def to_block_index(self): # <<<<<<<<<<<<<< * locs, lens = get_blocks(self.indices) * return BlockIndex(self.length, locs, lens) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.to_block_index", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_locs); __Pyx_XDECREF(__pyx_v_lens); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":133 * return BlockIndex(self.length, locs, lens) * * cpdef IntIndex intersect(self, SparseIndex y_): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t out_length, xi, yi = 0, result_indexer = 0 */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_15intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_intersect(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y_, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_result_indexer; __pyx_t_5numpy_int32_t __pyx_v_xind; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; PyArrayObject *__pyx_v_new_indices = 0; struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_y = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_new_indices; __Pyx_Buffer __pyx_pybuffer_new_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; PyArrayObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; int __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; __Pyx_RefNannySetupContext("intersect", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_new_indices.pybuffer.buf = NULL; __pyx_pybuffer_new_indices.refcount = 0; __pyx_pybuffernd_new_indices.data = NULL; __pyx_pybuffernd_new_indices.rcbuffer = &__pyx_pybuffer_new_indices; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_intersect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_15intersect)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_y_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_y_)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_y_)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y_)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_y_)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(0, 133, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":135 * cpdef IntIndex intersect(self, SparseIndex y_): * cdef: * Py_ssize_t out_length, xi, yi = 0, result_indexer = 0 # <<<<<<<<<<<<<< * int32_t xind * ndarray[int32_t, ndim=1] xindices, yindices, new_indices */ __pyx_v_yi = 0; __pyx_v_result_indexer = 0; /* "pandas/_libs/sparse.pyx":141 * * # if is one already, returns self * y = y_.to_int_index() # <<<<<<<<<<<<<< * * if self.length != y.length: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_y_), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(0, 141, __pyx_L1_error) __pyx_v_y = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":143 * y = y_.to_int_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ __pyx_t_6 = ((__pyx_v_self->length != __pyx_v_y->length) != 0); if (unlikely(__pyx_t_6)) { /* "pandas/_libs/sparse.pyx":144 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xindices = self.indices */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 144, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":143 * y = y_.to_int_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ } /* "pandas/_libs/sparse.pyx":146 * raise Exception('Indices must reference same underlying length') * * xindices = self.indices # <<<<<<<<<<<<<< * yindices = y.indices * new_indices = np.empty(min( */ __pyx_t_1 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 146, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":147 * * xindices = self.indices * yindices = y.indices # <<<<<<<<<<<<<< * new_indices = np.empty(min( * len(xindices), len(yindices)), dtype=np.int32) */ __pyx_t_1 = ((PyObject *)__pyx_v_y->indices); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 147, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":148 * xindices = self.indices * yindices = y.indices * new_indices = np.empty(min( # <<<<<<<<<<<<<< * len(xindices), len(yindices)), dtype=np.int32) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":149 * yindices = y.indices * new_indices = np.empty(min( * len(xindices), len(yindices)), dtype=np.int32) # <<<<<<<<<<<<<< * * for xi from 0 <= xi < self.npoints: */ __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_yindices)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 149, __pyx_L1_error) __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_xindices)); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 149, __pyx_L1_error) if (((__pyx_t_11 < __pyx_t_12) != 0)) { __pyx_t_13 = __pyx_t_11; } else { __pyx_t_13 = __pyx_t_12; } __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "pandas/_libs/sparse.pyx":148 * xindices = self.indices * yindices = y.indices * new_indices = np.empty(min( # <<<<<<<<<<<<<< * len(xindices), len(yindices)), dtype=np.int32) * */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":149 * yindices = y.indices * new_indices = np.empty(min( * len(xindices), len(yindices)), dtype=np.int32) # <<<<<<<<<<<<<< * * for xi from 0 <= xi < self.npoints: */ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":148 * xindices = self.indices * yindices = y.indices * new_indices = np.empty(min( # <<<<<<<<<<<<<< * len(xindices), len(yindices)), dtype=np.int32) * */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 148, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_new_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_new_indices.diminfo[0].strides = __pyx_pybuffernd_new_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_indices.diminfo[0].shape = __pyx_pybuffernd_new_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 148, __pyx_L1_error) } __pyx_t_14 = 0; __pyx_v_new_indices = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":151 * len(xindices), len(yindices)), dtype=np.int32) * * for xi from 0 <= xi < self.npoints: # <<<<<<<<<<<<<< * xind = xindices[xi] * */ __pyx_t_13 = __pyx_v_self->npoints; for (__pyx_v_xi = 0; __pyx_v_xi < __pyx_t_13; __pyx_v_xi++) { /* "pandas/_libs/sparse.pyx":152 * * for xi from 0 <= xi < self.npoints: * xind = xindices[xi] # <<<<<<<<<<<<<< * * while yi < y.npoints and yindices[yi] < xind: */ __pyx_t_15 = __pyx_v_xi; __pyx_t_7 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_xindices.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_xindices.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 152, __pyx_L1_error) } __pyx_v_xind = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":154 * xind = xindices[xi] * * while yi < y.npoints and yindices[yi] < xind: # <<<<<<<<<<<<<< * yi += 1 * */ while (1) { __pyx_t_16 = ((__pyx_v_yi < __pyx_v_y->npoints) != 0); if (__pyx_t_16) { } else { __pyx_t_6 = __pyx_t_16; goto __pyx_L8_bool_binop_done; } __pyx_t_17 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_yindices.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_yindices.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 154, __pyx_L1_error) } __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_yindices.diminfo[0].strides)) < __pyx_v_xind) != 0); __pyx_t_6 = __pyx_t_16; __pyx_L8_bool_binop_done:; if (!__pyx_t_6) break; /* "pandas/_libs/sparse.pyx":155 * * while yi < y.npoints and yindices[yi] < xind: * yi += 1 # <<<<<<<<<<<<<< * * if yi >= y.npoints: */ __pyx_v_yi = (__pyx_v_yi + 1); } /* "pandas/_libs/sparse.pyx":157 * yi += 1 * * if yi >= y.npoints: # <<<<<<<<<<<<<< * break * */ __pyx_t_6 = ((__pyx_v_yi >= __pyx_v_y->npoints) != 0); if (__pyx_t_6) { /* "pandas/_libs/sparse.pyx":158 * * if yi >= y.npoints: * break # <<<<<<<<<<<<<< * * # TODO: would a two-pass algorithm be faster? */ goto __pyx_L5_break; /* "pandas/_libs/sparse.pyx":157 * yi += 1 * * if yi >= y.npoints: # <<<<<<<<<<<<<< * break * */ } /* "pandas/_libs/sparse.pyx":161 * * # TODO: would a two-pass algorithm be faster? * if yindices[yi] == xind: # <<<<<<<<<<<<<< * new_indices[result_indexer] = xind * result_indexer += 1 */ __pyx_t_18 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_yindices.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_yindices.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 161, __pyx_L1_error) } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)) == __pyx_v_xind) != 0); if (__pyx_t_6) { /* "pandas/_libs/sparse.pyx":162 * # TODO: would a two-pass algorithm be faster? * if yindices[yi] == xind: * new_indices[result_indexer] = xind # <<<<<<<<<<<<<< * result_indexer += 1 * */ __pyx_t_19 = __pyx_v_result_indexer; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_new_indices.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_new_indices.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 162, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_new_indices.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new_indices.diminfo[0].strides) = __pyx_v_xind; /* "pandas/_libs/sparse.pyx":163 * if yindices[yi] == xind: * new_indices[result_indexer] = xind * result_indexer += 1 # <<<<<<<<<<<<<< * * new_indices = new_indices[:result_indexer] */ __pyx_v_result_indexer = (__pyx_v_result_indexer + 1); /* "pandas/_libs/sparse.pyx":161 * * # TODO: would a two-pass algorithm be faster? * if yindices[yi] == xind: # <<<<<<<<<<<<<< * new_indices[result_indexer] = xind * result_indexer += 1 */ } } __pyx_L5_break:; /* "pandas/_libs/sparse.pyx":165 * result_indexer += 1 * * new_indices = new_indices[:result_indexer] # <<<<<<<<<<<<<< * return IntIndex(self.length, new_indices) * */ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_result_indexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PySlice_New(Py_None, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_new_indices), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 165, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_new_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_new_indices.diminfo[0].strides = __pyx_pybuffernd_new_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_indices.diminfo[0].shape = __pyx_pybuffernd_new_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 165, __pyx_L1_error) } __pyx_t_14 = 0; __Pyx_DECREF_SET(__pyx_v_new_indices, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":166 * * new_indices = new_indices[:result_indexer] * return IntIndex(self.length, new_indices) # <<<<<<<<<<<<<< * * cpdef IntIndex make_union(self, SparseIndex y_): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_new_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_new_indices)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_new_indices)); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_IntIndex), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":133 * return BlockIndex(self.length, locs, lens) * * cpdef IntIndex intersect(self, SparseIndex y_): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t out_length, xi, yi = 0, result_indexer = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_new_indices); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_15intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_15intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_y_) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("intersect (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "y_", 0))) __PYX_ERR(0, 133, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_14intersect(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_y_)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_14intersect(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y_) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("intersect", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6sparse_8IntIndex_intersect(__pyx_v_self, __pyx_v_y_, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":168 * return IntIndex(self.length, new_indices) * * cpdef IntIndex make_union(self, SparseIndex y_): # <<<<<<<<<<<<<< * * cdef: */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_17make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_make_union(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y_, int __pyx_skip_dispatch) { PyArrayObject *__pyx_v_new_indices = 0; struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_y = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_new_indices; __Pyx_Buffer __pyx_pybuffer_new_indices; struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyArrayObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("make_union", 0); __pyx_pybuffer_new_indices.pybuffer.buf = NULL; __pyx_pybuffer_new_indices.refcount = 0; __pyx_pybuffernd_new_indices.data = NULL; __pyx_pybuffernd_new_indices.rcbuffer = &__pyx_pybuffer_new_indices; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_make_union); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_17make_union)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_y_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_y_)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_y_)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y_)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_y_)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(0, 168, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":175 * * # if is one already, returns self * y = y_.to_int_index() # <<<<<<<<<<<<<< * * if self.length != y.length: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_y_), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(0, 175, __pyx_L1_error) __pyx_v_y = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":177 * y = y_.to_int_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise ValueError('Indices must reference same underlying length') * */ __pyx_t_6 = ((__pyx_v_self->length != __pyx_v_y->length) != 0); if (unlikely(__pyx_t_6)) { /* "pandas/_libs/sparse.pyx":178 * * if self.length != y.length: * raise ValueError('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * new_indices = np.union1d(self.indices, y.indices) */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 178, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":177 * y = y_.to_int_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise ValueError('Indices must reference same underlying length') * */ } /* "pandas/_libs/sparse.pyx":180 * raise ValueError('Indices must reference same underlying length') * * new_indices = np.union1d(self.indices, y.indices) # <<<<<<<<<<<<<< * return IntIndex(self.length, new_indices) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_union1d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self->indices), ((PyObject *)__pyx_v_y->indices)}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self->indices), ((PyObject *)__pyx_v_y->indices)}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self->indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->indices)); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, ((PyObject *)__pyx_v_self->indices)); __Pyx_INCREF(((PyObject *)__pyx_v_y->indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y->indices)); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, ((PyObject *)__pyx_v_y->indices)); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 180, __pyx_L1_error) __pyx_t_8 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_new_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_new_indices.diminfo[0].strides = __pyx_pybuffernd_new_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_indices.diminfo[0].shape = __pyx_pybuffernd_new_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 180, __pyx_L1_error) } __pyx_t_8 = 0; __pyx_v_new_indices = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":181 * * new_indices = np.union1d(self.indices, y.indices) * return IntIndex(self.length, new_indices) # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_new_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_new_indices)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_new_indices)); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_IntIndex), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":168 * return IntIndex(self.length, new_indices) * * cpdef IntIndex make_union(self, SparseIndex y_): # <<<<<<<<<<<<<< * * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.make_union", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_new_indices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_new_indices); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_17make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y_); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_17make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y_) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("make_union (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "y_", 0))) __PYX_ERR(0, 168, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_16make_union(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_y_)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_16make_union(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y_) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("make_union", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6sparse_8IntIndex_make_union(__pyx_v_self, __pyx_v_y_, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.make_union", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":184 * * @cython.wraparound(False) * cpdef int32_t lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * """ * Return the internal location if value exists on given index. */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static __pyx_t_5numpy_int32_t __pyx_f_6pandas_5_libs_6sparse_8IntIndex_lookup(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_index, int __pyx_skip_dispatch) { __pyx_t_5numpy_int32_t __pyx_v_res; PyArrayObject *__pyx_v_inds = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_inds; __Pyx_Buffer __pyx_pybuffer_inds; __pyx_t_5numpy_int32_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __pyx_t_5numpy_int32_t __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; __Pyx_RefNannySetupContext("lookup", 0); __pyx_pybuffer_inds.pybuffer.buf = NULL; __pyx_pybuffer_inds.refcount = 0; __pyx_pybuffernd_inds.data = NULL; __pyx_pybuffernd_inds.rcbuffer = &__pyx_pybuffer_inds; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lookup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_19lookup)) { __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __Pyx_PyInt_As_npy_int32(__pyx_t_2); if (unlikely((__pyx_t_7 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_7; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":193 * ndarray[int32_t, ndim=1] inds * * inds = self.indices # <<<<<<<<<<<<<< * if self.npoints == 0: * return -1 */ __pyx_t_1 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inds.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_inds.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_inds.rcbuffer->pybuffer, (PyObject*)__pyx_v_inds, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_inds.diminfo[0].strides = __pyx_pybuffernd_inds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_inds.diminfo[0].shape = __pyx_pybuffernd_inds.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 193, __pyx_L1_error) } __pyx_v_inds = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":194 * * inds = self.indices * if self.npoints == 0: # <<<<<<<<<<<<<< * return -1 * elif index < 0 or self.length <= index: */ __pyx_t_12 = ((__pyx_v_self->npoints == 0) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse.pyx":195 * inds = self.indices * if self.npoints == 0: * return -1 # <<<<<<<<<<<<<< * elif index < 0 or self.length <= index: * return -1 */ __pyx_r = -1; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":194 * * inds = self.indices * if self.npoints == 0: # <<<<<<<<<<<<<< * return -1 * elif index < 0 or self.length <= index: */ } /* "pandas/_libs/sparse.pyx":196 * if self.npoints == 0: * return -1 * elif index < 0 or self.length <= index: # <<<<<<<<<<<<<< * return -1 * */ __pyx_t_13 = ((__pyx_v_index < 0) != 0); if (!__pyx_t_13) { } else { __pyx_t_12 = __pyx_t_13; goto __pyx_L4_bool_binop_done; } __pyx_t_13 = ((__pyx_v_self->length <= __pyx_v_index) != 0); __pyx_t_12 = __pyx_t_13; __pyx_L4_bool_binop_done:; if (__pyx_t_12) { /* "pandas/_libs/sparse.pyx":197 * return -1 * elif index < 0 or self.length <= index: * return -1 # <<<<<<<<<<<<<< * * res = inds.searchsorted(index) */ __pyx_r = -1; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":196 * if self.npoints == 0: * return -1 * elif index < 0 or self.length <= index: # <<<<<<<<<<<<<< * return -1 * */ } /* "pandas/_libs/sparse.pyx":199 * return -1 * * res = inds.searchsorted(index) # <<<<<<<<<<<<<< * if res == self.npoints: * return -1 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_inds), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_7 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_res = __pyx_t_7; /* "pandas/_libs/sparse.pyx":200 * * res = inds.searchsorted(index) * if res == self.npoints: # <<<<<<<<<<<<<< * return -1 * elif inds[res] == index: */ __pyx_t_12 = ((__pyx_v_res == __pyx_v_self->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse.pyx":201 * res = inds.searchsorted(index) * if res == self.npoints: * return -1 # <<<<<<<<<<<<<< * elif inds[res] == index: * return res */ __pyx_r = -1; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":200 * * res = inds.searchsorted(index) * if res == self.npoints: # <<<<<<<<<<<<<< * return -1 * elif inds[res] == index: */ } /* "pandas/_libs/sparse.pyx":202 * if res == self.npoints: * return -1 * elif inds[res] == index: # <<<<<<<<<<<<<< * return res * else: */ __pyx_t_14 = __pyx_v_res; __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_inds.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 202, __pyx_L1_error) } __pyx_t_12 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_inds.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_inds.diminfo[0].strides)) == __pyx_v_index) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse.pyx":203 * return -1 * elif inds[res] == index: * return res # <<<<<<<<<<<<<< * else: * return -1 */ __pyx_r = __pyx_v_res; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":202 * if res == self.npoints: * return -1 * elif inds[res] == index: # <<<<<<<<<<<<<< * return res * else: */ } /* "pandas/_libs/sparse.pyx":205 * return res * else: * return -1 # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ /*else*/ { __pyx_r = -1; goto __pyx_L0; } /* "pandas/_libs/sparse.pyx":184 * * @cython.wraparound(False) * cpdef int32_t lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * """ * Return the internal location if value exists on given index. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inds.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_WriteUnraisable("pandas._libs.sparse.IntIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inds.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_inds); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static char __pyx_doc_6pandas_5_libs_6sparse_8IntIndex_18lookup[] = "\n Return the internal location if value exists on given index.\n Return -1 otherwise.\n "; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { Py_ssize_t __pyx_v_index; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup (wrapper)", 0); assert(__pyx_arg_index); { __pyx_v_index = __Pyx_PyIndex_AsSsize_t(__pyx_arg_index); if (unlikely((__pyx_v_index == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_18lookup(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self), ((Py_ssize_t)__pyx_v_index)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_18lookup(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, Py_ssize_t __pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("lookup", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_f_6pandas_5_libs_6sparse_8IntIndex_lookup(__pyx_v_self, __pyx_v_index, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":208 * * @cython.wraparound(False) * cpdef ndarray[int32_t] lookup_array(self, ndarray[ # <<<<<<<<<<<<<< * int32_t, ndim=1] indexer): * """ */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_21lookup_array(PyObject *__pyx_v_self, PyObject *__pyx_v_indexer); /*proto*/ static PyArrayObject *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_lookup_array(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_indexer, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_n; PyArrayObject *__pyx_v_inds = 0; PyArrayObject *__pyx_v_mask = 0; PyArrayObject *__pyx_v_masked = 0; PyArrayObject *__pyx_v_res = 0; PyArrayObject *__pyx_v_results = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_inds; __Pyx_Buffer __pyx_pybuffer_inds; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; __Pyx_LocalBuf_ND __pyx_pybuffernd_masked; __Pyx_Buffer __pyx_pybuffer_masked; __Pyx_LocalBuf_ND __pyx_pybuffernd_res; __Pyx_Buffer __pyx_pybuffer_res; __Pyx_LocalBuf_ND __pyx_pybuffernd_results; __Pyx_Buffer __pyx_pybuffer_results; PyArrayObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; PyArrayObject *__pyx_t_15 = NULL; PyArrayObject *__pyx_t_16 = NULL; PyArrayObject *__pyx_t_17 = NULL; __Pyx_RefNannySetupContext("lookup_array", 0); __pyx_pybuffer_inds.pybuffer.buf = NULL; __pyx_pybuffer_inds.refcount = 0; __pyx_pybuffernd_inds.data = NULL; __pyx_pybuffernd_inds.rcbuffer = &__pyx_pybuffer_inds; __pyx_pybuffer_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; __pyx_pybuffer_masked.pybuffer.buf = NULL; __pyx_pybuffer_masked.refcount = 0; __pyx_pybuffernd_masked.data = NULL; __pyx_pybuffernd_masked.rcbuffer = &__pyx_pybuffer_masked; __pyx_pybuffer_res.pybuffer.buf = NULL; __pyx_pybuffer_res.refcount = 0; __pyx_pybuffernd_res.data = NULL; __pyx_pybuffernd_res.rcbuffer = &__pyx_pybuffer_res; __pyx_pybuffer_results.pybuffer.buf = NULL; __pyx_pybuffer_results.refcount = 0; __pyx_pybuffernd_results.data = NULL; __pyx_pybuffernd_results.rcbuffer = &__pyx_pybuffer_results; __pyx_pybuffer_indexer.pybuffer.buf = NULL; __pyx_pybuffer_indexer.refcount = 0; __pyx_pybuffernd_indexer.data = NULL; __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 208, __pyx_L1_error) } __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0]; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lookup_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_21lookup_array)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_indexer)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_indexer)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_indexer)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indexer)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_indexer)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 208, __pyx_L1_error) __pyx_r = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":221 * ndarray[int32_t, ndim=1] results * * n = len(indexer) # <<<<<<<<<<<<<< * results = np.empty(n, dtype=np.int32) * results.fill(-1) */ __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 221, __pyx_L1_error) __pyx_v_n = __pyx_t_6; /* "pandas/_libs/sparse.pyx":222 * * n = len(indexer) * results = np.empty(n, dtype=np.int32) # <<<<<<<<<<<<<< * results.fill(-1) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 222, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_results.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_results.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_results.rcbuffer->pybuffer, (PyObject*)__pyx_v_results, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_results.diminfo[0].strides = __pyx_pybuffernd_results.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_results.diminfo[0].shape = __pyx_pybuffernd_results.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 222, __pyx_L1_error) } __pyx_t_7 = 0; __pyx_v_results = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":223 * n = len(indexer) * results = np.empty(n, dtype=np.int32) * results.fill(-1) # <<<<<<<<<<<<<< * * if self.npoints == 0: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_results), __pyx_n_s_fill); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":225 * results.fill(-1) * * if self.npoints == 0: # <<<<<<<<<<<<<< * return results * */ __pyx_t_12 = ((__pyx_v_self->npoints == 0) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse.pyx":226 * * if self.npoints == 0: * return results # <<<<<<<<<<<<<< * * inds = self.indices */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_results)); __pyx_r = ((PyArrayObject *)__pyx_v_results); goto __pyx_L0; /* "pandas/_libs/sparse.pyx":225 * results.fill(-1) * * if self.npoints == 0: # <<<<<<<<<<<<<< * return results * */ } /* "pandas/_libs/sparse.pyx":228 * return results * * inds = self.indices # <<<<<<<<<<<<<< * mask = (inds[0] <= indexer) & (indexer <= inds[len(inds) - 1]) * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inds.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_inds.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_inds.rcbuffer->pybuffer, (PyObject*)__pyx_v_inds, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_inds.diminfo[0].strides = __pyx_pybuffernd_inds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_inds.diminfo[0].shape = __pyx_pybuffernd_inds.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 228, __pyx_L1_error) } __pyx_v_inds = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":229 * * inds = self.indices * mask = (inds[0] <= indexer) & (indexer <= inds[len(inds) - 1]) # <<<<<<<<<<<<<< * * masked = indexer[mask] */ __pyx_t_13 = 0; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_inds.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 229, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_From_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_inds.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_inds.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_v_indexer), Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_inds)); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 229, __pyx_L1_error) __pyx_t_14 = (__pyx_t_6 - 1); __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_inds.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 229, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_From_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_inds.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_inds.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_indexer), __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_And(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 229, __pyx_L1_error) __pyx_t_15 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 229, __pyx_L1_error) } __pyx_t_15 = 0; __pyx_v_mask = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":231 * mask = (inds[0] <= indexer) & (indexer <= inds[len(inds) - 1]) * * masked = indexer[mask] # <<<<<<<<<<<<<< * res = inds.searchsorted(masked).astype(np.int32) * */ __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_indexer), ((PyObject *)__pyx_v_mask)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 231, __pyx_L1_error) __pyx_t_16 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_masked.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_masked.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_masked.rcbuffer->pybuffer, (PyObject*)__pyx_v_masked, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_masked.diminfo[0].strides = __pyx_pybuffernd_masked.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_masked.diminfo[0].shape = __pyx_pybuffernd_masked.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 231, __pyx_L1_error) } __pyx_t_16 = 0; __pyx_v_masked = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":232 * * masked = indexer[mask] * res = inds.searchsorted(masked).astype(np.int32) # <<<<<<<<<<<<<< * * res[inds[res] != masked] = -1 */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_inds), __pyx_n_s_searchsorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_2) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_masked)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)__pyx_v_masked)}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)__pyx_v_masked)}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_masked)); __Pyx_GIVEREF(((PyObject *)__pyx_v_masked)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_masked)); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_astype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 232, __pyx_L1_error) __pyx_t_17 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_res.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_res.rcbuffer->pybuffer, (PyObject*)__pyx_v_res, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_res.diminfo[0].strides = __pyx_pybuffernd_res.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_res.diminfo[0].shape = __pyx_pybuffernd_res.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 232, __pyx_L1_error) } __pyx_t_17 = 0; __pyx_v_res = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":234 * res = inds.searchsorted(masked).astype(np.int32) * * res[inds[res] != masked] = -1 # <<<<<<<<<<<<<< * results[mask] = res * return results */ __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_inds), ((PyObject *)__pyx_v_res)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_v_masked), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_res), __pyx_t_4, __pyx_int_neg_1) < 0)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":235 * * res[inds[res] != masked] = -1 * results[mask] = res # <<<<<<<<<<<<<< * return results * */ if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_results), ((PyObject *)__pyx_v_mask), ((PyObject *)__pyx_v_res)) < 0)) __PYX_ERR(0, 235, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":236 * res[inds[res] != masked] = -1 * results[mask] = res * return results # <<<<<<<<<<<<<< * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_results)); __pyx_r = ((PyArrayObject *)__pyx_v_results); goto __pyx_L0; /* "pandas/_libs/sparse.pyx":208 * * @cython.wraparound(False) * cpdef ndarray[int32_t] lookup_array(self, ndarray[ # <<<<<<<<<<<<<< * int32_t, ndim=1] indexer): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_masked.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_results.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.lookup_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_masked.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_res.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_results.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_inds); __Pyx_XDECREF((PyObject *)__pyx_v_mask); __Pyx_XDECREF((PyObject *)__pyx_v_masked); __Pyx_XDECREF((PyObject *)__pyx_v_res); __Pyx_XDECREF((PyObject *)__pyx_v_results); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_21lookup_array(PyObject *__pyx_v_self, PyObject *__pyx_v_indexer); /*proto*/ static char __pyx_doc_6pandas_5_libs_6sparse_8IntIndex_20lookup_array[] = "\n Vectorized lookup, returns ndarray[int32_t]\n "; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_21lookup_array(PyObject *__pyx_v_self, PyObject *__pyx_v_indexer) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) __PYX_ERR(0, 208, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_20lookup_array(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self), ((PyArrayObject *)__pyx_v_indexer)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_20lookup_array(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_indexer) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("lookup_array", 0); __pyx_pybuffer_indexer.pybuffer.buf = NULL; __pyx_pybuffer_indexer.refcount = 0; __pyx_pybuffernd_indexer.data = NULL; __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 208, __pyx_L1_error) } __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6sparse_8IntIndex_lookup_array(__pyx_v_self, __pyx_v_indexer, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.lookup_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":238 * return results * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * float64_t fill_value, SparseIndex other_): * cdef: */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyArrayObject *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_reindex(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other_, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_other = 0; PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_sinds = 0; PyArrayObject *__pyx_v_oinds = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_oinds; __Pyx_Buffer __pyx_pybuffer_oinds; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_sinds; __Pyx_Buffer __pyx_pybuffer_sinds; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyArrayObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; int __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; __Pyx_RefNannySetupContext("reindex", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; __pyx_pybuffer_sinds.pybuffer.buf = NULL; __pyx_pybuffer_sinds.refcount = 0; __pyx_pybuffernd_sinds.data = NULL; __pyx_pybuffernd_sinds.rcbuffer = &__pyx_pybuffer_sinds; __pyx_pybuffer_oinds.pybuffer.buf = NULL; __pyx_pybuffer_oinds.refcount = 0; __pyx_pybuffernd_oinds.data = NULL; __pyx_pybuffernd_oinds.rcbuffer = &__pyx_pybuffer_oinds; __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 238, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reindex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_23reindex)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_fill_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_values), __pyx_t_3, ((PyObject *)__pyx_v_other_)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_values), __pyx_t_3, ((PyObject *)__pyx_v_other_)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_other_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_other_)); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)__pyx_v_other_)); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 238, __pyx_L1_error) __pyx_r = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":241 * float64_t fill_value, SparseIndex other_): * cdef: * Py_ssize_t i = 0, j = 0 # <<<<<<<<<<<<<< * IntIndex other * ndarray[float64_t, ndim=1] result */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/_libs/sparse.pyx":246 * ndarray[int32_t, ndim=1] sinds, oinds * * other = other_.to_int_index() # <<<<<<<<<<<<<< * * oinds = other.indices */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other_), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(0, 246, __pyx_L1_error) __pyx_v_other = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":248 * other = other_.to_int_index() * * oinds = other.indices # <<<<<<<<<<<<<< * sinds = self.indices * */ __pyx_t_1 = ((PyObject *)__pyx_v_other->indices); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oinds.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oinds.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oinds.rcbuffer->pybuffer, (PyObject*)__pyx_v_oinds, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_oinds.diminfo[0].strides = __pyx_pybuffernd_oinds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oinds.diminfo[0].shape = __pyx_pybuffernd_oinds.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 248, __pyx_L1_error) } __pyx_v_oinds = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":249 * * oinds = other.indices * sinds = self.indices # <<<<<<<<<<<<<< * * result = np.empty(other.npoints, dtype=np.float64) */ __pyx_t_1 = ((PyObject *)__pyx_v_self->indices); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sinds.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sinds.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sinds.rcbuffer->pybuffer, (PyObject*)__pyx_v_sinds, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_sinds.diminfo[0].strides = __pyx_pybuffernd_sinds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sinds.diminfo[0].shape = __pyx_pybuffernd_sinds.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 249, __pyx_L1_error) } __pyx_v_sinds = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":251 * sinds = self.indices * * result = np.empty(other.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * result.fill(fill_value) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_other->npoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 251, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 251, __pyx_L1_error) } __pyx_t_11 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/_libs/sparse.pyx":252 * * result = np.empty(other.npoints, dtype=np.float64) * result.fill(fill_value) # <<<<<<<<<<<<<< * * for 0 <= i < other.npoints: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_fill); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_fill_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_2) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/_libs/sparse.pyx":254 * result.fill(fill_value) * * for 0 <= i < other.npoints: # <<<<<<<<<<<<<< * while oinds[i] > sinds[j] and j < self.npoints: * j += 1 */ __pyx_t_12 = __pyx_v_other->npoints; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/_libs/sparse.pyx":255 * * for 0 <= i < other.npoints: * while oinds[i] > sinds[j] and j < self.npoints: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_14 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_oinds.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_oinds.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 255, __pyx_L1_error) } __pyx_t_15 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_sinds.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_sinds.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 255, __pyx_L1_error) } __pyx_t_16 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oinds.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_oinds.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_sinds.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_sinds.diminfo[0].strides))) != 0); if (__pyx_t_16) { } else { __pyx_t_13 = __pyx_t_16; goto __pyx_L7_bool_binop_done; } __pyx_t_16 = ((__pyx_v_j < __pyx_v_self->npoints) != 0); __pyx_t_13 = __pyx_t_16; __pyx_L7_bool_binop_done:; if (!__pyx_t_13) break; /* "pandas/_libs/sparse.pyx":256 * for 0 <= i < other.npoints: * while oinds[i] > sinds[j] and j < self.npoints: * j += 1 # <<<<<<<<<<<<<< * * if j == self.npoints: */ __pyx_v_j = (__pyx_v_j + 1); } /* "pandas/_libs/sparse.pyx":258 * j += 1 * * if j == self.npoints: # <<<<<<<<<<<<<< * break * */ __pyx_t_13 = ((__pyx_v_j == __pyx_v_self->npoints) != 0); if (__pyx_t_13) { /* "pandas/_libs/sparse.pyx":259 * * if j == self.npoints: * break # <<<<<<<<<<<<<< * * if oinds[i] < sinds[j]: */ goto __pyx_L4_break; /* "pandas/_libs/sparse.pyx":258 * j += 1 * * if j == self.npoints: # <<<<<<<<<<<<<< * break * */ } /* "pandas/_libs/sparse.pyx":261 * break * * if oinds[i] < sinds[j]: # <<<<<<<<<<<<<< * continue * elif oinds[i] == sinds[j]: */ __pyx_t_17 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_oinds.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_oinds.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 261, __pyx_L1_error) } __pyx_t_18 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_sinds.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_sinds.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 261, __pyx_L1_error) } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oinds.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_oinds.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_sinds.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_sinds.diminfo[0].strides))) != 0); if (__pyx_t_13) { /* "pandas/_libs/sparse.pyx":262 * * if oinds[i] < sinds[j]: * continue # <<<<<<<<<<<<<< * elif oinds[i] == sinds[j]: * result[i] = values[j] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse.pyx":261 * break * * if oinds[i] < sinds[j]: # <<<<<<<<<<<<<< * continue * elif oinds[i] == sinds[j]: */ } /* "pandas/_libs/sparse.pyx":263 * if oinds[i] < sinds[j]: * continue * elif oinds[i] == sinds[j]: # <<<<<<<<<<<<<< * result[i] = values[j] * j += 1 */ __pyx_t_19 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_oinds.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_oinds.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 263, __pyx_L1_error) } __pyx_t_20 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_sinds.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_sinds.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 263, __pyx_L1_error) } __pyx_t_13 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oinds.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oinds.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_sinds.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_sinds.diminfo[0].strides))) != 0); if (__pyx_t_13) { /* "pandas/_libs/sparse.pyx":264 * continue * elif oinds[i] == sinds[j]: * result[i] = values[j] # <<<<<<<<<<<<<< * j += 1 * */ __pyx_t_21 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 264, __pyx_L1_error) } __pyx_t_22 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_result.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 264, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":265 * elif oinds[i] == sinds[j]: * result[i] = values[j] * j += 1 # <<<<<<<<<<<<<< * * return result */ __pyx_v_j = (__pyx_v_j + 1); /* "pandas/_libs/sparse.pyx":263 * if oinds[i] < sinds[j]: * continue * elif oinds[i] == sinds[j]: # <<<<<<<<<<<<<< * result[i] = values[j] * j += 1 */ } __pyx_L3_continue:; } __pyx_L4_break:; /* "pandas/_libs/sparse.pyx":267 * j += 1 * * return result # <<<<<<<<<<<<<< * * cpdef put(self, ndarray[float64_t, ndim=1] values, */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_result)); __pyx_r = ((PyArrayObject *)__pyx_v_result); goto __pyx_L0; /* "pandas/_libs/sparse.pyx":238 * return results * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * float64_t fill_value, SparseIndex other_): * cdef: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oinds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sinds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.reindex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oinds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sinds.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_other); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_sinds); __Pyx_XDECREF((PyObject *)__pyx_v_oinds); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; __pyx_t_5numpy_float64_t __pyx_v_fill_value; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other_ = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reindex (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_fill_value,&__pyx_n_s_other,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 1); __PYX_ERR(0, 238, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 2); __PYX_ERR(0, 238, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reindex") < 0)) __PYX_ERR(0, 238, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_fill_value = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fill_value == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 239, __pyx_L3_error) __pyx_v_other_ = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 238, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.reindex", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) __PYX_ERR(0, 238, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "other_", 0))) __PYX_ERR(0, 239, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_22reindex(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_fill_value, __pyx_v_other_); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_22reindex(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other_) { __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("reindex", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 238, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6sparse_8IntIndex_reindex(__pyx_v_self, __pyx_v_values, __pyx_v_fill_value, __pyx_v_other_, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.reindex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":269 * return result * * cpdef put(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices, object to_put): * pass */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_put(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyArrayObject *__pyx_v_indices, CYTHON_UNUSED PyObject *__pyx_v_to_put, int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("put", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 269, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 269, __pyx_L1_error) } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_25put)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_values), ((PyObject *)__pyx_v_indices), __pyx_v_to_put}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_values), ((PyObject *)__pyx_v_indices), __pyx_v_to_put}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_indices)); __Pyx_INCREF(__pyx_v_to_put); __Pyx_GIVEREF(__pyx_v_to_put); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_to_put); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":271 * cpdef put(self, ndarray[float64_t, ndim=1] values, * ndarray[int32_t, ndim=1] indices, object to_put): * pass # <<<<<<<<<<<<<< * * cpdef take(self, ndarray[float64_t, ndim=1] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":269 * return result * * cpdef put(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices, object to_put): * pass */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indices = 0; PyObject *__pyx_v_to_put = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("put (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indices,&__pyx_n_s_to_put,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 1); __PYX_ERR(0, 269, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to_put)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 2); __PYX_ERR(0, 269, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "put") < 0)) __PYX_ERR(0, 269, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indices = ((PyArrayObject *)values[1]); __pyx_v_to_put = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 269, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.put", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) __PYX_ERR(0, 269, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) __PYX_ERR(0, 270, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_24put(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_indices, __pyx_v_to_put); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_24put(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices, PyObject *__pyx_v_to_put) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("put", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 269, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 269, __pyx_L1_error) } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_8IntIndex_put(__pyx_v_self, __pyx_v_values, __pyx_v_indices, __pyx_v_to_put, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":273 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_8IntIndex_take(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyArrayObject *__pyx_v_indices, int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("take", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 273, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 273, __pyx_L1_error) } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_take); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_27take)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_values), ((PyObject *)__pyx_v_indices)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_values), ((PyObject *)__pyx_v_indices)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_indices)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":275 * cpdef take(self, ndarray[float64_t, ndim=1] values, * ndarray[int32_t, ndim=1] indices): * pass # <<<<<<<<<<<<<< * * cpdef get_blocks(ndarray[int32_t, ndim=1] indices): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.take", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":273 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indices = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indices,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take", 1, 2, 2, 1); __PYX_ERR(0, 273, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take") < 0)) __PYX_ERR(0, 273, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indices = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 273, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.take", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) __PYX_ERR(0, 273, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) __PYX_ERR(0, 274, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_26take(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_indices); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_26take(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("take", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 273, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 273, __pyx_L1_error) } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_8IntIndex_take(__pyx_v_self, __pyx_v_values, __pyx_v_indices, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.take", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":55 * * cdef readonly: * Py_ssize_t length, npoints # <<<<<<<<<<<<<< * ndarray indices * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_6length_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_6length_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_6length___get__(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_6length___get__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_7npoints_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_7npoints_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_7npoints___get__(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_7npoints___get__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->npoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.IntIndex.npoints.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":56 * cdef readonly: * Py_ssize_t length, npoints * ndarray indices # <<<<<<<<<<<<<< * * def __init__(self, Py_ssize_t length, indices): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_7indices_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_7indices_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8IntIndex_7indices___get__(((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8IntIndex_7indices___get__(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->indices)); __pyx_r = ((PyObject *)__pyx_v_self->indices); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":277 * pass * * cpdef get_blocks(ndarray[int32_t, ndim=1] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t init_len, i, npoints, result_indexer = 0 */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_1get_blocks(PyObject *__pyx_self, PyObject *__pyx_v_indices); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_get_blocks(PyArrayObject *__pyx_v_indices, CYTHON_UNUSED int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_npoints; Py_ssize_t __pyx_v_result_indexer; __pyx_t_5numpy_int32_t __pyx_v_block; __pyx_t_5numpy_int32_t __pyx_v_length; __pyx_t_5numpy_int32_t __pyx_v_cur; __pyx_t_5numpy_int32_t __pyx_v_prev; PyArrayObject *__pyx_v_locs = 0; PyArrayObject *__pyx_v_lens = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_lens; __Pyx_Buffer __pyx_pybuffer_lens; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyArrayObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; Py_ssize_t __pyx_t_14; __pyx_t_5numpy_int32_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; __Pyx_RefNannySetupContext("get_blocks", 0); __pyx_pybuffer_locs.pybuffer.buf = NULL; __pyx_pybuffer_locs.refcount = 0; __pyx_pybuffernd_locs.data = NULL; __pyx_pybuffernd_locs.rcbuffer = &__pyx_pybuffer_locs; __pyx_pybuffer_lens.pybuffer.buf = NULL; __pyx_pybuffer_lens.refcount = 0; __pyx_pybuffernd_lens.data = NULL; __pyx_pybuffernd_lens.rcbuffer = &__pyx_pybuffer_lens; __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 277, __pyx_L1_error) } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse.pyx":279 * cpdef get_blocks(ndarray[int32_t, ndim=1] indices): * cdef: * Py_ssize_t init_len, i, npoints, result_indexer = 0 # <<<<<<<<<<<<<< * int32_t block, length = 1, cur, prev * ndarray[int32_t, ndim=1] locs, lens */ __pyx_v_result_indexer = 0; /* "pandas/_libs/sparse.pyx":280 * cdef: * Py_ssize_t init_len, i, npoints, result_indexer = 0 * int32_t block, length = 1, cur, prev # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] locs, lens * */ __pyx_v_length = 1; /* "pandas/_libs/sparse.pyx":283 * ndarray[int32_t, ndim=1] locs, lens * * npoints = len(indices) # <<<<<<<<<<<<<< * * # just handle the special empty case separately */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indices)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 283, __pyx_L1_error) __pyx_v_npoints = __pyx_t_1; /* "pandas/_libs/sparse.pyx":286 * * # just handle the special empty case separately * if npoints == 0: # <<<<<<<<<<<<<< * return np.array([], dtype=np.int32), np.array([], dtype=np.int32) * */ __pyx_t_2 = ((__pyx_v_npoints == 0) != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse.pyx":287 * # just handle the special empty case separately * if npoints == 0: * return np.array([], dtype=np.int32), np.array([], dtype=np.int32) # <<<<<<<<<<<<<< * * # block size can't be longer than npoints */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":286 * * # just handle the special empty case separately * if npoints == 0: # <<<<<<<<<<<<<< * return np.array([], dtype=np.int32), np.array([], dtype=np.int32) * */ } /* "pandas/_libs/sparse.pyx":290 * * # block size can't be longer than npoints * locs = np.empty(npoints, dtype=np.int32) # <<<<<<<<<<<<<< * lens = np.empty(npoints, dtype=np.int32) * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_npoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 290, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_v_locs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0; } __pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 290, __pyx_L1_error) } __pyx_t_9 = 0; __pyx_v_locs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":291 * # block size can't be longer than npoints * locs = np.empty(npoints, dtype=np.int32) * lens = np.empty(npoints, dtype=np.int32) # <<<<<<<<<<<<<< * * # TODO: two-pass algorithm faster? */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 291, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lens.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lens.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10 < 0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lens.rcbuffer->pybuffer, (PyObject*)__pyx_v_lens, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11); } __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0; } __pyx_pybuffernd_lens.diminfo[0].strides = __pyx_pybuffernd_lens.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lens.diminfo[0].shape = __pyx_pybuffernd_lens.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 291, __pyx_L1_error) } __pyx_t_9 = 0; __pyx_v_lens = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":294 * * # TODO: two-pass algorithm faster? * prev = block = indices[0] # <<<<<<<<<<<<<< * for i from 1 <= i < npoints: * cur = indices[i] */ __pyx_t_14 = 0; __pyx_t_10 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); __PYX_ERR(0, 294, __pyx_L1_error) } __pyx_t_15 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indices.diminfo[0].strides)); __pyx_v_prev = __pyx_t_15; __pyx_v_block = __pyx_t_15; /* "pandas/_libs/sparse.pyx":295 * # TODO: two-pass algorithm faster? * prev = block = indices[0] * for i from 1 <= i < npoints: # <<<<<<<<<<<<<< * cur = indices[i] * if cur - prev > 1: */ __pyx_t_1 = __pyx_v_npoints; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "pandas/_libs/sparse.pyx":296 * prev = block = indices[0] * for i from 1 <= i < npoints: * cur = indices[i] # <<<<<<<<<<<<<< * if cur - prev > 1: * # new block */ __pyx_t_16 = __pyx_v_i; __pyx_t_10 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); __PYX_ERR(0, 296, __pyx_L1_error) } __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indices.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":297 * for i from 1 <= i < npoints: * cur = indices[i] * if cur - prev > 1: # <<<<<<<<<<<<<< * # new block * locs[result_indexer] = block */ __pyx_t_2 = (((__pyx_v_cur - __pyx_v_prev) > 1) != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse.pyx":299 * if cur - prev > 1: * # new block * locs[result_indexer] = block # <<<<<<<<<<<<<< * lens[result_indexer] = length * block = cur */ __pyx_t_17 = __pyx_v_result_indexer; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); __PYX_ERR(0, 299, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_locs.diminfo[0].strides) = __pyx_v_block; /* "pandas/_libs/sparse.pyx":300 * # new block * locs[result_indexer] = block * lens[result_indexer] = length # <<<<<<<<<<<<<< * block = cur * length = 1 */ __pyx_t_18 = __pyx_v_result_indexer; __pyx_t_10 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_lens.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_lens.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); __PYX_ERR(0, 300, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lens.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_lens.diminfo[0].strides) = __pyx_v_length; /* "pandas/_libs/sparse.pyx":301 * locs[result_indexer] = block * lens[result_indexer] = length * block = cur # <<<<<<<<<<<<<< * length = 1 * result_indexer += 1 */ __pyx_v_block = __pyx_v_cur; /* "pandas/_libs/sparse.pyx":302 * lens[result_indexer] = length * block = cur * length = 1 # <<<<<<<<<<<<<< * result_indexer += 1 * else: */ __pyx_v_length = 1; /* "pandas/_libs/sparse.pyx":303 * block = cur * length = 1 * result_indexer += 1 # <<<<<<<<<<<<<< * else: * # same block, increment length */ __pyx_v_result_indexer = (__pyx_v_result_indexer + 1); /* "pandas/_libs/sparse.pyx":297 * for i from 1 <= i < npoints: * cur = indices[i] * if cur - prev > 1: # <<<<<<<<<<<<<< * # new block * locs[result_indexer] = block */ goto __pyx_L6; } /* "pandas/_libs/sparse.pyx":306 * else: * # same block, increment length * length += 1 # <<<<<<<<<<<<<< * * prev = cur */ /*else*/ { __pyx_v_length = (__pyx_v_length + 1); } __pyx_L6:; /* "pandas/_libs/sparse.pyx":308 * length += 1 * * prev = cur # <<<<<<<<<<<<<< * * locs[result_indexer] = block */ __pyx_v_prev = __pyx_v_cur; } /* "pandas/_libs/sparse.pyx":310 * prev = cur * * locs[result_indexer] = block # <<<<<<<<<<<<<< * lens[result_indexer] = length * result_indexer += 1 */ __pyx_t_19 = __pyx_v_result_indexer; __pyx_t_10 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); __PYX_ERR(0, 310, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_locs.diminfo[0].strides) = __pyx_v_block; /* "pandas/_libs/sparse.pyx":311 * * locs[result_indexer] = block * lens[result_indexer] = length # <<<<<<<<<<<<<< * result_indexer += 1 * locs = locs[:result_indexer] */ __pyx_t_20 = __pyx_v_result_indexer; __pyx_t_10 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lens.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lens.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); __PYX_ERR(0, 311, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lens.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lens.diminfo[0].strides) = __pyx_v_length; /* "pandas/_libs/sparse.pyx":312 * locs[result_indexer] = block * lens[result_indexer] = length * result_indexer += 1 # <<<<<<<<<<<<<< * locs = locs[:result_indexer] * lens = lens[:result_indexer] */ __pyx_v_result_indexer = (__pyx_v_result_indexer + 1); /* "pandas/_libs/sparse.pyx":313 * lens[result_indexer] = length * result_indexer += 1 * locs = locs[:result_indexer] # <<<<<<<<<<<<<< * lens = lens[:result_indexer] * return locs, lens */ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_result_indexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySlice_New(Py_None, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_locs), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 313, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_v_locs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0; } __pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 313, __pyx_L1_error) } __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_locs, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":314 * result_indexer += 1 * locs = locs[:result_indexer] * lens = lens[:result_indexer] # <<<<<<<<<<<<<< * return locs, lens * */ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_result_indexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySlice_New(Py_None, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_lens), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 314, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lens.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lens.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10 < 0)) { PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lens.rcbuffer->pybuffer, (PyObject*)__pyx_v_lens, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_13, __pyx_t_12, __pyx_t_11); } __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0; } __pyx_pybuffernd_lens.diminfo[0].strides = __pyx_pybuffernd_lens.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lens.diminfo[0].shape = __pyx_pybuffernd_lens.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 314, __pyx_L1_error) } __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_lens, ((PyArrayObject *)__pyx_t_4)); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":315 * locs = locs[:result_indexer] * lens = lens[:result_indexer] * return locs, lens # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_locs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_locs)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_locs)); __Pyx_INCREF(((PyObject *)__pyx_v_lens)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lens)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_lens)); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":277 * pass * * cpdef get_blocks(ndarray[int32_t, ndim=1] indices): # <<<<<<<<<<<<<< * cdef: * Py_ssize_t init_len, i, npoints, result_indexer = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lens.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.get_blocks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lens.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XDECREF((PyObject *)__pyx_v_lens); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_1get_blocks(PyObject *__pyx_self, PyObject *__pyx_v_indices); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_1get_blocks(PyObject *__pyx_self, PyObject *__pyx_v_indices) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_blocks (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) __PYX_ERR(0, 277, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_get_blocks(__pyx_self, ((PyArrayObject *)__pyx_v_indices)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_get_blocks(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_blocks", 0); __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 277, __pyx_L1_error) } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_get_blocks(__pyx_v_indices, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.get_blocks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":336 * int32_t *lenbuf * * def __init__(self, length, blocs, blengths): # <<<<<<<<<<<<<< * * self.blocs = np.ascontiguousarray(blocs, dtype=np.int32) */ /* Python wrapper */ static int __pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_length = 0; PyObject *__pyx_v_blocs = 0; PyObject *__pyx_v_blengths = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_length,&__pyx_n_s_blocs,&__pyx_n_s_blengths,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blocs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 336, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blengths)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 336, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 336, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_length = values[0]; __pyx_v_blocs = values[1]; __pyx_v_blengths = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 336, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex___init__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self), __pyx_v_length, __pyx_v_blocs, __pyx_v_blengths); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex___init__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyObject *__pyx_v_length, PyObject *__pyx_v_blocs, PyObject *__pyx_v_blengths) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __pyx_t_5numpy_int32_t __pyx_t_6; Py_ssize_t __pyx_t_7; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/_libs/sparse.pyx":338 * def __init__(self, length, blocs, blengths): * * self.blocs = np.ascontiguousarray(blocs, dtype=np.int32) # <<<<<<<<<<<<<< * self.blengths = np.ascontiguousarray(blengths, dtype=np.int32) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_blocs); __Pyx_GIVEREF(__pyx_v_blocs); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_blocs); __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->blocs); __Pyx_DECREF(((PyObject *)__pyx_v_self->blocs)); __pyx_v_self->blocs = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":339 * * self.blocs = np.ascontiguousarray(blocs, dtype=np.int32) * self.blengths = np.ascontiguousarray(blengths, dtype=np.int32) # <<<<<<<<<<<<<< * * # in case we need */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_blengths); __Pyx_GIVEREF(__pyx_v_blengths); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_blengths); __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->blengths); __Pyx_DECREF(((PyObject *)__pyx_v_self->blengths)); __pyx_v_self->blengths = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":342 * * # in case we need * self.locbuf = self.blocs.data # <<<<<<<<<<<<<< * self.lenbuf = self.blengths.data * */ __pyx_v_self->locbuf = ((__pyx_t_5numpy_int32_t *)__pyx_v_self->blocs->data); /* "pandas/_libs/sparse.pyx":343 * # in case we need * self.locbuf = self.blocs.data * self.lenbuf = self.blengths.data # <<<<<<<<<<<<<< * * self.length = length */ __pyx_v_self->lenbuf = ((__pyx_t_5numpy_int32_t *)__pyx_v_self->blengths->data); /* "pandas/_libs/sparse.pyx":345 * self.lenbuf = self.blengths.data * * self.length = length # <<<<<<<<<<<<<< * self.nblocks = np.int32(len(self.blocs)) * self.npoints = self.blengths.sum() */ __pyx_t_6 = __Pyx_PyInt_As_npy_int32(__pyx_v_length); if (unlikely((__pyx_t_6 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L1_error) __pyx_v_self->length = __pyx_t_6; /* "pandas/_libs/sparse.pyx":346 * * self.length = length * self.nblocks = np.int32(len(self.blocs)) # <<<<<<<<<<<<<< * self.npoints = self.blengths.sum() * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_3) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_1}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_1}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyInt_As_npy_int32(__pyx_t_4); if (unlikely((__pyx_t_6 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->nblocks = __pyx_t_6; /* "pandas/_libs/sparse.pyx":347 * self.length = length * self.nblocks = np.int32(len(self.blocs)) * self.npoints = self.blengths.sum() # <<<<<<<<<<<<<< * * # self.block_start = blocs */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->blengths), __pyx_n_s_sum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_2) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyInt_As_npy_int32(__pyx_t_4); if (unlikely((__pyx_t_6 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->npoints = __pyx_t_6; /* "pandas/_libs/sparse.pyx":352 * # self.block_end = blocs + blengths * * self.check_integrity() # <<<<<<<<<<<<<< * * def __reduce__(self): */ __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self->__pyx_vtab)->check_integrity(__pyx_v_self, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":336 * int32_t *lenbuf * * def __init__(self, length, blocs, blengths): # <<<<<<<<<<<<<< * * self.blocs = np.ascontiguousarray(blocs, dtype=np.int32) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":354 * self.check_integrity() * * def __reduce__(self): # <<<<<<<<<<<<<< * args = (self.length, self.blocs, self.blengths) * return BlockIndex, args */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_2__reduce__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_2__reduce__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_v_args = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); /* "pandas/_libs/sparse.pyx":355 * * def __reduce__(self): * args = (self.length, self.blocs, self.blengths) # <<<<<<<<<<<<<< * return BlockIndex, args * */ __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->blocs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blocs)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->blocs)); __Pyx_INCREF(((PyObject *)__pyx_v_self->blengths)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blengths)); PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->blengths)); __pyx_t_1 = 0; __pyx_v_args = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":356 * def __reduce__(self): * args = (self.length, self.blocs, self.blengths) * return BlockIndex, args # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_BlockIndex)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_BlockIndex)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_BlockIndex)); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_args); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":354 * self.check_integrity() * * def __reduce__(self): # <<<<<<<<<<<<<< * args = (self.length, self.blocs, self.blengths) * return BlockIndex, args */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":358 * return BlockIndex, args * * def __repr__(self): # <<<<<<<<<<<<<< * output = 'BlockIndex\n' * output += 'Block locations: %s\n' % repr(self.blocs) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_4__repr__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_4__repr__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_v_output = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); /* "pandas/_libs/sparse.pyx":359 * * def __repr__(self): * output = 'BlockIndex\n' # <<<<<<<<<<<<<< * output += 'Block locations: %s\n' % repr(self.blocs) * output += 'Block lengths: %s' % repr(self.blengths) */ __Pyx_INCREF(__pyx_n_s_BlockIndex); __pyx_v_output = __pyx_n_s_BlockIndex; /* "pandas/_libs/sparse.pyx":360 * def __repr__(self): * output = 'BlockIndex\n' * output += 'Block locations: %s\n' % repr(self.blocs) # <<<<<<<<<<<<<< * output += 'Block lengths: %s' % repr(self.blengths) * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Block_locations_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_output, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_output, __pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":361 * output = 'BlockIndex\n' * output += 'Block locations: %s\n' % repr(self.blocs) * output += 'Block lengths: %s' % repr(self.blengths) # <<<<<<<<<<<<<< * * return output */ __pyx_t_2 = ((PyObject *)__pyx_v_self->blengths); __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Block_lengths_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_output, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_output, __pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":363 * output += 'Block lengths: %s' % repr(self.blengths) * * return output # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_output); __pyx_r = __pyx_v_output; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":358 * return BlockIndex, args * * def __repr__(self): # <<<<<<<<<<<<<< * output = 'BlockIndex\n' * output += 'Block locations: %s\n' % repr(self.blocs) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_output); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":366 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_5ngaps_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_5ngaps_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_5ngaps___get__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_5ngaps___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "pandas/_libs/sparse.pyx":367 * @property * def ngaps(self): * return self.length - self.npoints # <<<<<<<<<<<<<< * * cpdef check_integrity(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int32((__pyx_v_self->length - __pyx_v_self->npoints)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":366 * * @property * def ngaps(self): # <<<<<<<<<<<<<< * return self.length - self.npoints * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.ngaps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":369 * return self.length - self.npoints * * cpdef check_integrity(self): # <<<<<<<<<<<<<< * """ * Check: */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_check_integrity(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; PyArrayObject *__pyx_v_blocs = 0; PyArrayObject *__pyx_v_blengths = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_blengths; __Pyx_Buffer __pyx_pybuffer_blengths; __Pyx_LocalBuf_ND __pyx_pybuffernd_blocs; __Pyx_Buffer __pyx_pybuffer_blocs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; __pyx_t_5numpy_int32_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; __Pyx_RefNannySetupContext("check_integrity", 0); __pyx_pybuffer_blocs.pybuffer.buf = NULL; __pyx_pybuffer_blocs.refcount = 0; __pyx_pybuffernd_blocs.data = NULL; __pyx_pybuffernd_blocs.rcbuffer = &__pyx_pybuffer_blocs; __pyx_pybuffer_blengths.pybuffer.buf = NULL; __pyx_pybuffer_blengths.refcount = 0; __pyx_pybuffernd_blengths.data = NULL; __pyx_pybuffernd_blengths.rcbuffer = &__pyx_pybuffer_blengths; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_integrity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7check_integrity)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":380 * ndarray[int32_t, ndim=1] blocs, blengths * * blocs = self.blocs # <<<<<<<<<<<<<< * blengths = self.blengths * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_blocs.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_blocs.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_5 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_blocs.rcbuffer->pybuffer, (PyObject*)__pyx_v_blocs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8); } __pyx_t_6 = __pyx_t_7 = __pyx_t_8 = 0; } __pyx_pybuffernd_blocs.diminfo[0].strides = __pyx_pybuffernd_blocs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_blocs.diminfo[0].shape = __pyx_pybuffernd_blocs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 380, __pyx_L1_error) } __pyx_v_blocs = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":381 * * blocs = self.blocs * blengths = self.blengths # <<<<<<<<<<<<<< * * if len(blocs) != len(blengths): */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blengths); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_blengths.rcbuffer->pybuffer); __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_blengths.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_5 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_blengths.rcbuffer->pybuffer, (PyObject*)__pyx_v_blengths, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6); } __pyx_t_8 = __pyx_t_7 = __pyx_t_6 = 0; } __pyx_pybuffernd_blengths.diminfo[0].strides = __pyx_pybuffernd_blengths.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_blengths.diminfo[0].shape = __pyx_pybuffernd_blengths.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 381, __pyx_L1_error) } __pyx_v_blengths = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":383 * blengths = self.blengths * * if len(blocs) != len(blengths): # <<<<<<<<<<<<<< * raise ValueError('block bound arrays must be same length') * */ __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_blocs)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 383, __pyx_L1_error) __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_blengths)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 383, __pyx_L1_error) __pyx_t_11 = ((__pyx_t_9 != __pyx_t_10) != 0); if (unlikely(__pyx_t_11)) { /* "pandas/_libs/sparse.pyx":384 * * if len(blocs) != len(blengths): * raise ValueError('block bound arrays must be same length') # <<<<<<<<<<<<<< * * for i from 0 <= i < self.nblocks: */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 384, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":383 * blengths = self.blengths * * if len(blocs) != len(blengths): # <<<<<<<<<<<<<< * raise ValueError('block bound arrays must be same length') * */ } /* "pandas/_libs/sparse.pyx":386 * raise ValueError('block bound arrays must be same length') * * for i from 0 <= i < self.nblocks: # <<<<<<<<<<<<<< * if i > 0: * if blocs[i] <= blocs[i - 1]: */ __pyx_t_12 = __pyx_v_self->nblocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/_libs/sparse.pyx":387 * * for i from 0 <= i < self.nblocks: * if i > 0: # <<<<<<<<<<<<<< * if blocs[i] <= blocs[i - 1]: * raise ValueError('Locations not in ascending order') */ __pyx_t_11 = ((__pyx_v_i > 0) != 0); if (__pyx_t_11) { /* "pandas/_libs/sparse.pyx":388 * for i from 0 <= i < self.nblocks: * if i > 0: * if blocs[i] <= blocs[i - 1]: # <<<<<<<<<<<<<< * raise ValueError('Locations not in ascending order') * */ __pyx_t_13 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); __PYX_ERR(0, 388, __pyx_L1_error) } __pyx_t_14 = (__pyx_v_i - 1); __pyx_t_5 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); __PYX_ERR(0, 388, __pyx_L1_error) } __pyx_t_11 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_blocs.diminfo[0].strides)) <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_blocs.diminfo[0].strides))) != 0); if (unlikely(__pyx_t_11)) { /* "pandas/_libs/sparse.pyx":389 * if i > 0: * if blocs[i] <= blocs[i - 1]: * raise ValueError('Locations not in ascending order') # <<<<<<<<<<<<<< * * if i < self.nblocks - 1: */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 389, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":388 * for i from 0 <= i < self.nblocks: * if i > 0: * if blocs[i] <= blocs[i - 1]: # <<<<<<<<<<<<<< * raise ValueError('Locations not in ascending order') * */ } /* "pandas/_libs/sparse.pyx":387 * * for i from 0 <= i < self.nblocks: * if i > 0: # <<<<<<<<<<<<<< * if blocs[i] <= blocs[i - 1]: * raise ValueError('Locations not in ascending order') */ } /* "pandas/_libs/sparse.pyx":391 * raise ValueError('Locations not in ascending order') * * if i < self.nblocks - 1: # <<<<<<<<<<<<<< * if blocs[i] + blengths[i] > blocs[i + 1]: * raise ValueError('Block %d overlaps' % i) */ __pyx_t_11 = ((__pyx_v_i < (__pyx_v_self->nblocks - 1)) != 0); if (__pyx_t_11) { /* "pandas/_libs/sparse.pyx":392 * * if i < self.nblocks - 1: * if blocs[i] + blengths[i] > blocs[i + 1]: # <<<<<<<<<<<<<< * raise ValueError('Block %d overlaps' % i) * else: */ __pyx_t_15 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); __PYX_ERR(0, 392, __pyx_L1_error) } __pyx_t_16 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_blengths.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_blengths.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); __PYX_ERR(0, 392, __pyx_L1_error) } __pyx_t_17 = (__pyx_v_i + 1); __pyx_t_5 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); __PYX_ERR(0, 392, __pyx_L1_error) } __pyx_t_11 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_blocs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blengths.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_blengths.diminfo[0].strides))) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_blocs.diminfo[0].strides))) != 0); if (unlikely(__pyx_t_11)) { /* "pandas/_libs/sparse.pyx":393 * if i < self.nblocks - 1: * if blocs[i] + blengths[i] > blocs[i + 1]: * raise ValueError('Block %d overlaps' % i) # <<<<<<<<<<<<<< * else: * if blocs[i] + blengths[i] > self.length: */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Block_d_overlaps, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 393, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":392 * * if i < self.nblocks - 1: * if blocs[i] + blengths[i] > blocs[i + 1]: # <<<<<<<<<<<<<< * raise ValueError('Block %d overlaps' % i) * else: */ } /* "pandas/_libs/sparse.pyx":391 * raise ValueError('Locations not in ascending order') * * if i < self.nblocks - 1: # <<<<<<<<<<<<<< * if blocs[i] + blengths[i] > blocs[i + 1]: * raise ValueError('Block %d overlaps' % i) */ goto __pyx_L8; } /* "pandas/_libs/sparse.pyx":395 * raise ValueError('Block %d overlaps' % i) * else: * if blocs[i] + blengths[i] > self.length: # <<<<<<<<<<<<<< * raise ValueError('Block %d extends beyond end' % i) * */ /*else*/ { __pyx_t_18 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_blocs.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_blocs.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); __PYX_ERR(0, 395, __pyx_L1_error) } __pyx_t_19 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_blengths.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_blengths.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); __PYX_ERR(0, 395, __pyx_L1_error) } __pyx_t_11 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blocs.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_blocs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blengths.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_blengths.diminfo[0].strides))) > __pyx_v_self->length) != 0); if (unlikely(__pyx_t_11)) { /* "pandas/_libs/sparse.pyx":396 * else: * if blocs[i] + blengths[i] > self.length: * raise ValueError('Block %d extends beyond end' % i) # <<<<<<<<<<<<<< * * # no zero-length blocks */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Block_d_extends_beyond_end, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 396, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":395 * raise ValueError('Block %d overlaps' % i) * else: * if blocs[i] + blengths[i] > self.length: # <<<<<<<<<<<<<< * raise ValueError('Block %d extends beyond end' % i) * */ } } __pyx_L8:; /* "pandas/_libs/sparse.pyx":399 * * # no zero-length blocks * if blengths[i] == 0: # <<<<<<<<<<<<<< * raise ValueError('Zero-length block %d' % i) * */ __pyx_t_20 = __pyx_v_i; __pyx_t_5 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_blengths.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_5 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_blengths.diminfo[0].shape)) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); __PYX_ERR(0, 399, __pyx_L1_error) } __pyx_t_11 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_blengths.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_blengths.diminfo[0].strides)) == 0) != 0); if (unlikely(__pyx_t_11)) { /* "pandas/_libs/sparse.pyx":400 * # no zero-length blocks * if blengths[i] == 0: * raise ValueError('Zero-length block %d' % i) # <<<<<<<<<<<<<< * * def equals(self, other): */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Zero_length_block_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 400, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":399 * * # no zero-length blocks * if blengths[i] == 0: # <<<<<<<<<<<<<< * raise ValueError('Zero-length block %d' % i) * */ } } /* "pandas/_libs/sparse.pyx":369 * return self.length - self.npoints * * cpdef check_integrity(self): # <<<<<<<<<<<<<< * """ * Check: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_blengths.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_blocs.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.check_integrity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_blengths.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_blocs.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_blocs); __Pyx_XDECREF((PyObject *)__pyx_v_blengths); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6pandas_5_libs_6sparse_10BlockIndex_6check_integrity[] = "\n Check:\n - Locations are in ascending order\n - No overlapping blocks\n - Blocks to not start after end of index, nor extend beyond end\n "; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7check_integrity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("check_integrity (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_6check_integrity(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_6check_integrity(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("check_integrity", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_10BlockIndex_check_integrity(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.check_integrity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":402 * raise ValueError('Zero-length block %d' % i) * * def equals(self, other): # <<<<<<<<<<<<<< * if not isinstance(other, BlockIndex): * return False */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_9equals(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_9equals(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("equals (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_8equals(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_8equals(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_same_length = NULL; PyObject *__pyx_v_same_blocks = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("equals", 0); /* "pandas/_libs/sparse.pyx":403 * * def equals(self, other): * if not isinstance(other, BlockIndex): # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse.pyx":404 * def equals(self, other): * if not isinstance(other, BlockIndex): * return False # <<<<<<<<<<<<<< * * if self is other: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":403 * * def equals(self, other): * if not isinstance(other, BlockIndex): # <<<<<<<<<<<<<< * return False * */ } /* "pandas/_libs/sparse.pyx":406 * return False * * if self is other: # <<<<<<<<<<<<<< * return True * */ __pyx_t_2 = (((PyObject *)__pyx_v_self) == __pyx_v_other); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse.pyx":407 * * if self is other: * return True # <<<<<<<<<<<<<< * * same_length = self.length == other.length */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":406 * return False * * if self is other: # <<<<<<<<<<<<<< * return True * */ } /* "pandas/_libs/sparse.pyx":409 * return True * * same_length = self.length == other.length # <<<<<<<<<<<<<< * same_blocks = (np.array_equal(self.blocs, other.blocs) and * np.array_equal(self.blengths, other.blengths)) */ __pyx_t_3 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_same_length = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":410 * * same_length = self.length == other.length * same_blocks = (np.array_equal(self.blocs, other.blocs) and # <<<<<<<<<<<<<< * np.array_equal(self.blengths, other.blengths)) * return same_length and same_blocks */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array_equal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_blocs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self->blocs), __pyx_t_3}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self->blocs), __pyx_t_3}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self->blocs)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blocs)); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, ((PyObject *)__pyx_v_self->blocs)); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 410, __pyx_L1_error) if (__pyx_t_1) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5_bool_binop_done; } /* "pandas/_libs/sparse.pyx":411 * same_length = self.length == other.length * same_blocks = (np.array_equal(self.blocs, other.blocs) and * np.array_equal(self.blengths, other.blengths)) # <<<<<<<<<<<<<< * return same_length and same_blocks * */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array_equal); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_blengths); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self->blengths), __pyx_t_6}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self->blengths), __pyx_t_6}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self->blengths)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->blengths)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, ((PyObject *)__pyx_v_self->blengths)); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_L5_bool_binop_done:; __pyx_v_same_blocks = __pyx_t_5; __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":412 * same_blocks = (np.array_equal(self.blocs, other.blocs) and * np.array_equal(self.blengths, other.blengths)) * return same_length and same_blocks # <<<<<<<<<<<<<< * * def to_block_index(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_same_length); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 412, __pyx_L1_error) if (__pyx_t_1) { } else { __Pyx_INCREF(__pyx_v_same_length); __pyx_t_5 = __pyx_v_same_length; goto __pyx_L7_bool_binop_done; } __Pyx_INCREF(__pyx_v_same_blocks); __pyx_t_5 = __pyx_v_same_blocks; __pyx_L7_bool_binop_done:; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":402 * raise ValueError('Zero-length block %d' % i) * * def equals(self, other): # <<<<<<<<<<<<<< * if not isinstance(other, BlockIndex): * return False */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.equals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_same_length); __Pyx_XDECREF(__pyx_v_same_blocks); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":414 * return same_length and same_blocks * * def to_block_index(self): # <<<<<<<<<<<<<< * return self * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_11to_block_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_11to_block_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_block_index (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_10to_block_index(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_10to_block_index(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_block_index", 0); /* "pandas/_libs/sparse.pyx":415 * * def to_block_index(self): * return self # <<<<<<<<<<<<<< * * def to_int_index(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "pandas/_libs/sparse.pyx":414 * return same_length and same_blocks * * def to_block_index(self): # <<<<<<<<<<<<<< * return self * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":417 * return self * * def to_int_index(self): # <<<<<<<<<<<<<< * cdef: * int32_t i = 0, j, b */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_13to_int_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_13to_int_index(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("to_int_index (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_12to_int_index(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_12to_int_index(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { __pyx_t_5numpy_int32_t __pyx_v_i; __pyx_t_5numpy_int32_t __pyx_v_j; __pyx_t_5numpy_int32_t __pyx_v_b; __pyx_t_5numpy_int32_t __pyx_v_offset; PyArrayObject *__pyx_v_indices = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; __pyx_t_5numpy_int32_t __pyx_t_12; Py_ssize_t __pyx_t_13; __Pyx_RefNannySetupContext("to_int_index", 0); __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; /* "pandas/_libs/sparse.pyx":419 * def to_int_index(self): * cdef: * int32_t i = 0, j, b # <<<<<<<<<<<<<< * int32_t offset * ndarray[int32_t, ndim=1] indices */ __pyx_v_i = 0; /* "pandas/_libs/sparse.pyx":423 * ndarray[int32_t, ndim=1] indices * * indices = np.empty(self.npoints, dtype=np.int32) # <<<<<<<<<<<<<< * * for b from 0 <= b < self.nblocks: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->npoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 423, __pyx_L1_error) __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 423, __pyx_L1_error) } __pyx_t_6 = 0; __pyx_v_indices = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":425 * indices = np.empty(self.npoints, dtype=np.int32) * * for b from 0 <= b < self.nblocks: # <<<<<<<<<<<<<< * offset = self.locbuf[b] * */ __pyx_t_11 = __pyx_v_self->nblocks; for (__pyx_v_b = 0; __pyx_v_b < __pyx_t_11; __pyx_v_b++) { /* "pandas/_libs/sparse.pyx":426 * * for b from 0 <= b < self.nblocks: * offset = self.locbuf[b] # <<<<<<<<<<<<<< * * for j from 0 <= j < self.lenbuf[b]: */ __pyx_v_offset = (__pyx_v_self->locbuf[__pyx_v_b]); /* "pandas/_libs/sparse.pyx":428 * offset = self.locbuf[b] * * for j from 0 <= j < self.lenbuf[b]: # <<<<<<<<<<<<<< * indices[i] = offset + j * i += 1 */ __pyx_t_12 = (__pyx_v_self->lenbuf[__pyx_v_b]); for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_12; __pyx_v_j++) { /* "pandas/_libs/sparse.pyx":429 * * for j from 0 <= j < self.lenbuf[b]: * indices[i] = offset + j # <<<<<<<<<<<<<< * i += 1 * */ __pyx_t_13 = __pyx_v_i; __pyx_t_7 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_indices.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 429, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indices.diminfo[0].strides) = (__pyx_v_offset + __pyx_v_j); /* "pandas/_libs/sparse.pyx":430 * for j from 0 <= j < self.lenbuf[b]: * indices[i] = offset + j * i += 1 # <<<<<<<<<<<<<< * * return IntIndex(self.length, indices) */ __pyx_v_i = (__pyx_v_i + 1); } } /* "pandas/_libs/sparse.pyx":432 * i += 1 * * return IntIndex(self.length, indices) # <<<<<<<<<<<<<< * * cpdef BlockIndex intersect(self, SparseIndex other): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_indices)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_IntIndex), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":417 * return self * * def to_int_index(self): # <<<<<<<<<<<<<< * cdef: * int32_t i = 0, j, b */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.to_int_index", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_indices); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":434 * return IntIndex(self.length, indices) * * cpdef BlockIndex intersect(self, SparseIndex other): # <<<<<<<<<<<<<< * """ * Intersect two BlockIndex objects */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_15intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_intersect(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other, int __pyx_skip_dispatch) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_y = 0; PyArrayObject *__pyx_v_xloc = 0; PyArrayObject *__pyx_v_xlen = 0; PyArrayObject *__pyx_v_yloc = 0; PyArrayObject *__pyx_v_ylen = 0; PyArrayObject *__pyx_v_out_bloc = 0; PyArrayObject *__pyx_v_out_blen = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_max_len; Py_ssize_t __pyx_v_result_indexer; __pyx_t_5numpy_int32_t __pyx_v_cur_loc; __pyx_t_5numpy_int32_t __pyx_v_cur_length; __pyx_t_5numpy_int32_t __pyx_v_diff; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_blen; __Pyx_Buffer __pyx_pybuffer_out_blen; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_bloc; __Pyx_Buffer __pyx_pybuffer_out_bloc; __Pyx_LocalBuf_ND __pyx_pybuffernd_xlen; __Pyx_Buffer __pyx_pybuffer_xlen; __Pyx_LocalBuf_ND __pyx_pybuffernd_xloc; __Pyx_Buffer __pyx_pybuffer_xloc; __Pyx_LocalBuf_ND __pyx_pybuffernd_ylen; __Pyx_Buffer __pyx_pybuffer_ylen; __Pyx_LocalBuf_ND __pyx_pybuffernd_yloc; __Pyx_Buffer __pyx_pybuffer_yloc; struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; __pyx_t_5numpy_int32_t __pyx_t_12; __pyx_t_5numpy_int32_t __pyx_t_13; Py_ssize_t __pyx_t_14; PyArrayObject *__pyx_t_15 = NULL; int __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; Py_ssize_t __pyx_t_29; Py_ssize_t __pyx_t_30; Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; Py_ssize_t __pyx_t_33; Py_ssize_t __pyx_t_34; Py_ssize_t __pyx_t_35; Py_ssize_t __pyx_t_36; __Pyx_RefNannySetupContext("intersect", 0); __pyx_pybuffer_xloc.pybuffer.buf = NULL; __pyx_pybuffer_xloc.refcount = 0; __pyx_pybuffernd_xloc.data = NULL; __pyx_pybuffernd_xloc.rcbuffer = &__pyx_pybuffer_xloc; __pyx_pybuffer_xlen.pybuffer.buf = NULL; __pyx_pybuffer_xlen.refcount = 0; __pyx_pybuffernd_xlen.data = NULL; __pyx_pybuffernd_xlen.rcbuffer = &__pyx_pybuffer_xlen; __pyx_pybuffer_yloc.pybuffer.buf = NULL; __pyx_pybuffer_yloc.refcount = 0; __pyx_pybuffernd_yloc.data = NULL; __pyx_pybuffernd_yloc.rcbuffer = &__pyx_pybuffer_yloc; __pyx_pybuffer_ylen.pybuffer.buf = NULL; __pyx_pybuffer_ylen.refcount = 0; __pyx_pybuffernd_ylen.data = NULL; __pyx_pybuffernd_ylen.rcbuffer = &__pyx_pybuffer_ylen; __pyx_pybuffer_out_bloc.pybuffer.buf = NULL; __pyx_pybuffer_out_bloc.refcount = 0; __pyx_pybuffernd_out_bloc.data = NULL; __pyx_pybuffernd_out_bloc.rcbuffer = &__pyx_pybuffer_out_bloc; __pyx_pybuffer_out_blen.pybuffer.buf = NULL; __pyx_pybuffer_out_blen.refcount = 0; __pyx_pybuffernd_out_blen.data = NULL; __pyx_pybuffernd_out_blen.rcbuffer = &__pyx_pybuffer_out_blen; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_intersect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_15intersect)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_other)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_other)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_other)); __Pyx_GIVEREF(((PyObject *)__pyx_v_other)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_other)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(0, 434, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":448 * BlockIndex y * ndarray[int32_t, ndim=1] xloc, xlen, yloc, ylen, out_bloc, out_blen * Py_ssize_t xi = 0, yi = 0, max_len, result_indexer = 0 # <<<<<<<<<<<<<< * int32_t cur_loc, cur_length, diff * */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_result_indexer = 0; /* "pandas/_libs/sparse.pyx":451 * int32_t cur_loc, cur_length, diff * * y = other.to_block_index() # <<<<<<<<<<<<<< * * if self.length != y.length: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(0, 451, __pyx_L1_error) __pyx_v_y = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":453 * y = other.to_block_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ __pyx_t_6 = ((__pyx_v_self->length != __pyx_v_y->length) != 0); if (unlikely(__pyx_t_6)) { /* "pandas/_libs/sparse.pyx":454 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xloc = self.blocs */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 454, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":453 * y = other.to_block_index() * * if self.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ } /* "pandas/_libs/sparse.pyx":456 * raise Exception('Indices must reference same underlying length') * * xloc = self.blocs # <<<<<<<<<<<<<< * xlen = self.blengths * yloc = y.blocs */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xloc.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xloc.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xloc.rcbuffer->pybuffer, (PyObject*)__pyx_v_xloc, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_xloc.diminfo[0].strides = __pyx_pybuffernd_xloc.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xloc.diminfo[0].shape = __pyx_pybuffernd_xloc.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 456, __pyx_L1_error) } __pyx_v_xloc = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":457 * * xloc = self.blocs * xlen = self.blengths # <<<<<<<<<<<<<< * yloc = y.blocs * ylen = y.blengths */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blengths); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xlen.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xlen.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xlen.rcbuffer->pybuffer, (PyObject*)__pyx_v_xlen, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_xlen.diminfo[0].strides = __pyx_pybuffernd_xlen.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xlen.diminfo[0].shape = __pyx_pybuffernd_xlen.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 457, __pyx_L1_error) } __pyx_v_xlen = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":458 * xloc = self.blocs * xlen = self.blengths * yloc = y.blocs # <<<<<<<<<<<<<< * ylen = y.blengths * */ __pyx_t_1 = ((PyObject *)__pyx_v_y->blocs); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yloc.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yloc.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yloc.rcbuffer->pybuffer, (PyObject*)__pyx_v_yloc, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_yloc.diminfo[0].strides = __pyx_pybuffernd_yloc.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yloc.diminfo[0].shape = __pyx_pybuffernd_yloc.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 458, __pyx_L1_error) } __pyx_v_yloc = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":459 * xlen = self.blengths * yloc = y.blocs * ylen = y.blengths # <<<<<<<<<<<<<< * * # block may be split, but can't exceed original len / 2 + 1 */ __pyx_t_1 = ((PyObject *)__pyx_v_y->blengths); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ylen.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ylen.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ylen.rcbuffer->pybuffer, (PyObject*)__pyx_v_ylen, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_ylen.diminfo[0].strides = __pyx_pybuffernd_ylen.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ylen.diminfo[0].shape = __pyx_pybuffernd_ylen.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 459, __pyx_L1_error) } __pyx_v_ylen = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":462 * * # block may be split, but can't exceed original len / 2 + 1 * max_len = int(min(self.length, y.length) / 2) + 1 # <<<<<<<<<<<<<< * out_bloc = np.empty(max_len, dtype=np.int32) * out_blen = np.empty(max_len, dtype=np.int32) */ __pyx_t_11 = __pyx_v_y->length; __pyx_t_12 = __pyx_v_self->length; if (((__pyx_t_11 < __pyx_t_12) != 0)) { __pyx_t_13 = __pyx_t_11; } else { __pyx_t_13 = __pyx_t_12; } __pyx_t_1 = __Pyx_PyInt_From_long(__Pyx_div_long(__pyx_t_13, 2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_max_len = __pyx_t_14; /* "pandas/_libs/sparse.pyx":463 * # block may be split, but can't exceed original len / 2 + 1 * max_len = int(min(self.length, y.length) / 2) + 1 * out_bloc = np.empty(max_len, dtype=np.int32) # <<<<<<<<<<<<<< * out_blen = np.empty(max_len, dtype=np.int32) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 463, __pyx_L1_error) __pyx_t_15 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_bloc, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_out_bloc.diminfo[0].strides = __pyx_pybuffernd_out_bloc.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_bloc.diminfo[0].shape = __pyx_pybuffernd_out_bloc.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 463, __pyx_L1_error) } __pyx_t_15 = 0; __pyx_v_out_bloc = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":464 * max_len = int(min(self.length, y.length) / 2) + 1 * out_bloc = np.empty(max_len, dtype=np.int32) * out_blen = np.empty(max_len, dtype=np.int32) # <<<<<<<<<<<<<< * * while True: */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_max_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 464, __pyx_L1_error) __pyx_t_15 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_blen, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_out_blen.diminfo[0].strides = __pyx_pybuffernd_out_blen.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_blen.diminfo[0].shape = __pyx_pybuffernd_out_blen.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 464, __pyx_L1_error) } __pyx_t_15 = 0; __pyx_v_out_blen = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":466 * out_blen = np.empty(max_len, dtype=np.int32) * * while True: # <<<<<<<<<<<<<< * # we are done (or possibly never began) * if xi >= self.nblocks or yi >= y.nblocks: */ while (1) { /* "pandas/_libs/sparse.pyx":468 * while True: * # we are done (or possibly never began) * if xi >= self.nblocks or yi >= y.nblocks: # <<<<<<<<<<<<<< * break * */ __pyx_t_16 = ((__pyx_v_xi >= __pyx_v_self->nblocks) != 0); if (!__pyx_t_16) { } else { __pyx_t_6 = __pyx_t_16; goto __pyx_L7_bool_binop_done; } __pyx_t_16 = ((__pyx_v_yi >= __pyx_v_y->nblocks) != 0); __pyx_t_6 = __pyx_t_16; __pyx_L7_bool_binop_done:; if (__pyx_t_6) { /* "pandas/_libs/sparse.pyx":469 * # we are done (or possibly never began) * if xi >= self.nblocks or yi >= y.nblocks: * break # <<<<<<<<<<<<<< * * # completely symmetric...would like to avoid code dup but oh well */ goto __pyx_L5_break; /* "pandas/_libs/sparse.pyx":468 * while True: * # we are done (or possibly never began) * if xi >= self.nblocks or yi >= y.nblocks: # <<<<<<<<<<<<<< * break * */ } /* "pandas/_libs/sparse.pyx":472 * * # completely symmetric...would like to avoid code dup but oh well * if xloc[xi] >= yloc[yi]: # <<<<<<<<<<<<<< * cur_loc = xloc[xi] * diff = xloc[xi] - yloc[yi] */ __pyx_t_17 = __pyx_v_xi; __pyx_t_7 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 472, __pyx_L1_error) } __pyx_t_18 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 472, __pyx_L1_error) } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xloc.diminfo[0].strides)) >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yloc.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/_libs/sparse.pyx":473 * # completely symmetric...would like to avoid code dup but oh well * if xloc[xi] >= yloc[yi]: * cur_loc = xloc[xi] # <<<<<<<<<<<<<< * diff = xloc[xi] - yloc[yi] * */ __pyx_t_19 = __pyx_v_xi; __pyx_t_7 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 473, __pyx_L1_error) } __pyx_v_cur_loc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_xloc.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":474 * if xloc[xi] >= yloc[yi]: * cur_loc = xloc[xi] * diff = xloc[xi] - yloc[yi] # <<<<<<<<<<<<<< * * if ylen[yi] <= diff: */ __pyx_t_20 = __pyx_v_xi; __pyx_t_7 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 474, __pyx_L1_error) } __pyx_t_21 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 474, __pyx_L1_error) } __pyx_v_diff = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_xloc.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_yloc.diminfo[0].strides))); /* "pandas/_libs/sparse.pyx":476 * diff = xloc[xi] - yloc[yi] * * if ylen[yi] <= diff: # <<<<<<<<<<<<<< * # have to skip this block * yi += 1 */ __pyx_t_22 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 476, __pyx_L1_error) } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_ylen.diminfo[0].strides)) <= __pyx_v_diff) != 0); if (__pyx_t_6) { /* "pandas/_libs/sparse.pyx":478 * if ylen[yi] <= diff: * # have to skip this block * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse.pyx":479 * # have to skip this block * yi += 1 * continue # <<<<<<<<<<<<<< * * if ylen[yi] - diff < xlen[xi]: */ goto __pyx_L4_continue; /* "pandas/_libs/sparse.pyx":476 * diff = xloc[xi] - yloc[yi] * * if ylen[yi] <= diff: # <<<<<<<<<<<<<< * # have to skip this block * yi += 1 */ } /* "pandas/_libs/sparse.pyx":481 * continue * * if ylen[yi] - diff < xlen[xi]: # <<<<<<<<<<<<<< * # take end of y block, move onward * cur_length = ylen[yi] - diff */ __pyx_t_23 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 481, __pyx_L1_error) } __pyx_t_24 = __pyx_v_xi; __pyx_t_7 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 481, __pyx_L1_error) } __pyx_t_6 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_ylen.diminfo[0].strides)) - __pyx_v_diff) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_xlen.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/_libs/sparse.pyx":483 * if ylen[yi] - diff < xlen[xi]: * # take end of y block, move onward * cur_length = ylen[yi] - diff # <<<<<<<<<<<<<< * yi += 1 * else: */ __pyx_t_25 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 483, __pyx_L1_error) } __pyx_v_cur_length = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_ylen.diminfo[0].strides)) - __pyx_v_diff); /* "pandas/_libs/sparse.pyx":484 * # take end of y block, move onward * cur_length = ylen[yi] - diff * yi += 1 # <<<<<<<<<<<<<< * else: * # take end of x block */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse.pyx":481 * continue * * if ylen[yi] - diff < xlen[xi]: # <<<<<<<<<<<<<< * # take end of y block, move onward * cur_length = ylen[yi] - diff */ goto __pyx_L11; } /* "pandas/_libs/sparse.pyx":487 * else: * # take end of x block * cur_length = xlen[xi] # <<<<<<<<<<<<<< * xi += 1 * */ /*else*/ { __pyx_t_26 = __pyx_v_xi; __pyx_t_7 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 487, __pyx_L1_error) } __pyx_v_cur_length = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_xlen.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":488 * # take end of x block * cur_length = xlen[xi] * xi += 1 # <<<<<<<<<<<<<< * * else: # xloc[xi] < yloc[yi] */ __pyx_v_xi = (__pyx_v_xi + 1); } __pyx_L11:; /* "pandas/_libs/sparse.pyx":472 * * # completely symmetric...would like to avoid code dup but oh well * if xloc[xi] >= yloc[yi]: # <<<<<<<<<<<<<< * cur_loc = xloc[xi] * diff = xloc[xi] - yloc[yi] */ goto __pyx_L9; } /* "pandas/_libs/sparse.pyx":491 * * else: # xloc[xi] < yloc[yi] * cur_loc = yloc[yi] # <<<<<<<<<<<<<< * diff = yloc[yi] - xloc[xi] * */ /*else*/ { __pyx_t_27 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_27 < 0) { __pyx_t_27 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 491, __pyx_L1_error) } __pyx_v_cur_loc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_yloc.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":492 * else: # xloc[xi] < yloc[yi] * cur_loc = yloc[yi] * diff = yloc[yi] - xloc[xi] # <<<<<<<<<<<<<< * * if xlen[xi] <= diff: */ __pyx_t_28 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_28 < 0) { __pyx_t_28 += __pyx_pybuffernd_yloc.diminfo[0].shape; if (unlikely(__pyx_t_28 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_yloc.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 492, __pyx_L1_error) } __pyx_t_29 = __pyx_v_xi; __pyx_t_7 = -1; if (__pyx_t_29 < 0) { __pyx_t_29 += __pyx_pybuffernd_xloc.diminfo[0].shape; if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_xloc.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 492, __pyx_L1_error) } __pyx_v_diff = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yloc.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_yloc.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xloc.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_xloc.diminfo[0].strides))); /* "pandas/_libs/sparse.pyx":494 * diff = yloc[yi] - xloc[xi] * * if xlen[xi] <= diff: # <<<<<<<<<<<<<< * # have to skip this block * xi += 1 */ __pyx_t_30 = __pyx_v_xi; __pyx_t_7 = -1; if (__pyx_t_30 < 0) { __pyx_t_30 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 494, __pyx_L1_error) } __pyx_t_6 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_xlen.diminfo[0].strides)) <= __pyx_v_diff) != 0); if (__pyx_t_6) { /* "pandas/_libs/sparse.pyx":496 * if xlen[xi] <= diff: * # have to skip this block * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse.pyx":497 * # have to skip this block * xi += 1 * continue # <<<<<<<<<<<<<< * * if xlen[xi] - diff < ylen[yi]: */ goto __pyx_L4_continue; /* "pandas/_libs/sparse.pyx":494 * diff = yloc[yi] - xloc[xi] * * if xlen[xi] <= diff: # <<<<<<<<<<<<<< * # have to skip this block * xi += 1 */ } /* "pandas/_libs/sparse.pyx":499 * continue * * if xlen[xi] - diff < ylen[yi]: # <<<<<<<<<<<<<< * # take end of x block, move onward * cur_length = xlen[xi] - diff */ __pyx_t_31 = __pyx_v_xi; __pyx_t_7 = -1; if (__pyx_t_31 < 0) { __pyx_t_31 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 499, __pyx_L1_error) } __pyx_t_32 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_32 < 0) { __pyx_t_32 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_32 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 499, __pyx_L1_error) } __pyx_t_6 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_xlen.diminfo[0].strides)) - __pyx_v_diff) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ylen.diminfo[0].strides))) != 0); if (__pyx_t_6) { /* "pandas/_libs/sparse.pyx":501 * if xlen[xi] - diff < ylen[yi]: * # take end of x block, move onward * cur_length = xlen[xi] - diff # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_33 = __pyx_v_xi; __pyx_t_7 = -1; if (__pyx_t_33 < 0) { __pyx_t_33 += __pyx_pybuffernd_xlen.diminfo[0].shape; if (unlikely(__pyx_t_33 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_xlen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 501, __pyx_L1_error) } __pyx_v_cur_length = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xlen.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_xlen.diminfo[0].strides)) - __pyx_v_diff); /* "pandas/_libs/sparse.pyx":502 * # take end of x block, move onward * cur_length = xlen[xi] - diff * xi += 1 # <<<<<<<<<<<<<< * else: * # take end of y block */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse.pyx":499 * continue * * if xlen[xi] - diff < ylen[yi]: # <<<<<<<<<<<<<< * # take end of x block, move onward * cur_length = xlen[xi] - diff */ goto __pyx_L13; } /* "pandas/_libs/sparse.pyx":505 * else: * # take end of y block * cur_length = ylen[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_34 = __pyx_v_yi; __pyx_t_7 = -1; if (__pyx_t_34 < 0) { __pyx_t_34 += __pyx_pybuffernd_ylen.diminfo[0].shape; if (unlikely(__pyx_t_34 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_ylen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 505, __pyx_L1_error) } __pyx_v_cur_length = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ylen.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_ylen.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":506 * # take end of y block * cur_length = ylen[yi] * yi += 1 # <<<<<<<<<<<<<< * * out_bloc[result_indexer] = cur_loc */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L13:; } __pyx_L9:; /* "pandas/_libs/sparse.pyx":508 * yi += 1 * * out_bloc[result_indexer] = cur_loc # <<<<<<<<<<<<<< * out_blen[result_indexer] = cur_length * result_indexer += 1 */ __pyx_t_35 = __pyx_v_result_indexer; __pyx_t_7 = -1; if (__pyx_t_35 < 0) { __pyx_t_35 += __pyx_pybuffernd_out_bloc.diminfo[0].shape; if (unlikely(__pyx_t_35 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_out_bloc.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 508, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out_bloc.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_out_bloc.diminfo[0].strides) = __pyx_v_cur_loc; /* "pandas/_libs/sparse.pyx":509 * * out_bloc[result_indexer] = cur_loc * out_blen[result_indexer] = cur_length # <<<<<<<<<<<<<< * result_indexer += 1 * */ __pyx_t_36 = __pyx_v_result_indexer; __pyx_t_7 = -1; if (__pyx_t_36 < 0) { __pyx_t_36 += __pyx_pybuffernd_out_blen.diminfo[0].shape; if (unlikely(__pyx_t_36 < 0)) __pyx_t_7 = 0; } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_out_blen.diminfo[0].shape)) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); __PYX_ERR(0, 509, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out_blen.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out_blen.diminfo[0].strides) = __pyx_v_cur_length; /* "pandas/_libs/sparse.pyx":510 * out_bloc[result_indexer] = cur_loc * out_blen[result_indexer] = cur_length * result_indexer += 1 # <<<<<<<<<<<<<< * * out_bloc = out_bloc[:result_indexer] */ __pyx_v_result_indexer = (__pyx_v_result_indexer + 1); __pyx_L4_continue:; } __pyx_L5_break:; /* "pandas/_libs/sparse.pyx":512 * result_indexer += 1 * * out_bloc = out_bloc[:result_indexer] # <<<<<<<<<<<<<< * out_blen = out_blen[:result_indexer] * */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_result_indexer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PySlice_New(Py_None, __pyx_t_5, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_out_bloc), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 512, __pyx_L1_error) __pyx_t_15 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_bloc, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_out_bloc.diminfo[0].strides = __pyx_pybuffernd_out_bloc.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_bloc.diminfo[0].shape = __pyx_pybuffernd_out_bloc.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 512, __pyx_L1_error) } __pyx_t_15 = 0; __Pyx_DECREF_SET(__pyx_v_out_bloc, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":513 * * out_bloc = out_bloc[:result_indexer] * out_blen = out_blen[:result_indexer] # <<<<<<<<<<<<<< * * return BlockIndex(self.length, out_bloc, out_blen) */ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_result_indexer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PySlice_New(Py_None, __pyx_t_5, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_out_blen), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 513, __pyx_L1_error) __pyx_t_15 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer); __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_7 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_blen, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_out_blen.diminfo[0].strides = __pyx_pybuffernd_out_blen.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_blen.diminfo[0].shape = __pyx_pybuffernd_out_blen.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 513, __pyx_L1_error) } __pyx_t_15 = 0; __Pyx_DECREF_SET(__pyx_v_out_blen, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; /* "pandas/_libs/sparse.pyx":515 * out_blen = out_blen[:result_indexer] * * return BlockIndex(self.length, out_bloc, out_blen) # <<<<<<<<<<<<<< * * cpdef BlockIndex make_union(self, SparseIndex y): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out_bloc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_bloc)); PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_out_bloc)); __Pyx_INCREF(((PyObject *)__pyx_v_out_blen)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_blen)); PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_out_blen)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_BlockIndex), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":434 * return IntIndex(self.length, indices) * * cpdef BlockIndex intersect(self, SparseIndex other): # <<<<<<<<<<<<<< * """ * Intersect two BlockIndex objects */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xlen.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xloc.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ylen.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yloc.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xlen.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xloc.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ylen.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yloc.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_xloc); __Pyx_XDECREF((PyObject *)__pyx_v_xlen); __Pyx_XDECREF((PyObject *)__pyx_v_yloc); __Pyx_XDECREF((PyObject *)__pyx_v_ylen); __Pyx_XDECREF((PyObject *)__pyx_v_out_bloc); __Pyx_XDECREF((PyObject *)__pyx_v_out_blen); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_15intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_6pandas_5_libs_6sparse_10BlockIndex_14intersect[] = "\n Intersect two BlockIndex objects\n\n Parameters\n ----------\n\n Returns\n -------\n intersection : BlockIndex\n "; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_15intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("intersect (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "other", 0))) __PYX_ERR(0, 434, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_14intersect(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_other)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_14intersect(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("intersect", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_intersect(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":517 * return BlockIndex(self.length, out_bloc, out_blen) * * cpdef BlockIndex make_union(self, SparseIndex y): # <<<<<<<<<<<<<< * """ * Combine together two BlockIndex objects, accepting indices if contained */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_17make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y); /*proto*/ static struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_make_union(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y, int __pyx_skip_dispatch) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("make_union", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_make_union); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_17make_union)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_y)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_y)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_y)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_y)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_y)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(0, 517, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":534 * union : BlockIndex * """ * return BlockUnion(self, y.to_block_index()).result # <<<<<<<<<<<<<< * * cpdef Py_ssize_t lookup(self, Py_ssize_t index): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_y), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_BlockUnion), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *)__pyx_t_1)->__pyx_base.result)); __pyx_r = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *)__pyx_t_1)->__pyx_base.result; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":517 * return BlockIndex(self.length, out_bloc, out_blen) * * cpdef BlockIndex make_union(self, SparseIndex y): # <<<<<<<<<<<<<< * """ * Combine together two BlockIndex objects, accepting indices if contained */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.make_union", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_17make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y); /*proto*/ static char __pyx_doc_6pandas_5_libs_6sparse_10BlockIndex_16make_union[] = "\n Combine together two BlockIndex objects, accepting indices if contained\n in one or the other\n\n Parameters\n ----------\n other : SparseIndex\n\n Notes\n -----\n union is a protected keyword in Cython, hence make_union\n\n Returns\n -------\n union : BlockIndex\n "; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_17make_union(PyObject *__pyx_v_self, PyObject *__pyx_v_y) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("make_union (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "y", 0))) __PYX_ERR(0, 517, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_16make_union(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self), ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_y)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_16make_union(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("make_union", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_make_union(__pyx_v_self, __pyx_v_y, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.make_union", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":536 * return BlockUnion(self, y.to_block_index()).result * * cpdef Py_ssize_t lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * """ * Return the internal location if value exists on given index. */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static Py_ssize_t __pyx_f_6pandas_5_libs_6sparse_10BlockIndex_lookup(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, Py_ssize_t __pyx_v_index, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_cum_len; PyArrayObject *__pyx_v_locs = 0; PyArrayObject *__pyx_v_lens = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_lens; __Pyx_Buffer __pyx_pybuffer_lens; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; Py_ssize_t __pyx_t_13; __pyx_t_5numpy_int32_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; __Pyx_RefNannySetupContext("lookup", 0); __pyx_pybuffer_locs.pybuffer.buf = NULL; __pyx_pybuffer_locs.refcount = 0; __pyx_pybuffernd_locs.data = NULL; __pyx_pybuffernd_locs.rcbuffer = &__pyx_pybuffer_locs; __pyx_pybuffer_lens.pybuffer.buf = NULL; __pyx_pybuffer_lens.refcount = 0; __pyx_pybuffernd_lens.data = NULL; __pyx_pybuffernd_lens.rcbuffer = &__pyx_pybuffer_lens; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lookup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_19lookup)) { __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_7; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":545 * ndarray[int32_t, ndim=1] locs, lens * * locs = self.blocs # <<<<<<<<<<<<<< * lens = self.blengths * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_v_locs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 545, __pyx_L1_error) } __pyx_v_locs = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":546 * * locs = self.blocs * lens = self.blengths # <<<<<<<<<<<<<< * * if self.nblocks == 0: */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blengths); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lens.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lens.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lens.rcbuffer->pybuffer, (PyObject*)__pyx_v_lens, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9); } __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 0; } __pyx_pybuffernd_lens.diminfo[0].strides = __pyx_pybuffernd_lens.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lens.diminfo[0].shape = __pyx_pybuffernd_lens.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 546, __pyx_L1_error) } __pyx_v_lens = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":548 * lens = self.blengths * * if self.nblocks == 0: # <<<<<<<<<<<<<< * return -1 * elif index < locs[0]: */ __pyx_t_12 = ((__pyx_v_self->nblocks == 0) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse.pyx":549 * * if self.nblocks == 0: * return -1 # <<<<<<<<<<<<<< * elif index < locs[0]: * return -1 */ __pyx_r = -1L; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":548 * lens = self.blengths * * if self.nblocks == 0: # <<<<<<<<<<<<<< * return -1 * elif index < locs[0]: */ } /* "pandas/_libs/sparse.pyx":550 * if self.nblocks == 0: * return -1 * elif index < locs[0]: # <<<<<<<<<<<<<< * return -1 * */ __pyx_t_13 = 0; __pyx_t_8 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 550, __pyx_L1_error) } __pyx_t_12 = ((__pyx_v_index < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_locs.diminfo[0].strides))) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse.pyx":551 * return -1 * elif index < locs[0]: * return -1 # <<<<<<<<<<<<<< * * cum_len = 0 */ __pyx_r = -1L; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":550 * if self.nblocks == 0: * return -1 * elif index < locs[0]: # <<<<<<<<<<<<<< * return -1 * */ } /* "pandas/_libs/sparse.pyx":553 * return -1 * * cum_len = 0 # <<<<<<<<<<<<<< * for i from 0 <= i < self.nblocks: * if index >= locs[i] and index < locs[i] + lens[i]: */ __pyx_v_cum_len = 0; /* "pandas/_libs/sparse.pyx":554 * * cum_len = 0 * for i from 0 <= i < self.nblocks: # <<<<<<<<<<<<<< * if index >= locs[i] and index < locs[i] + lens[i]: * return cum_len + index - locs[i] */ __pyx_t_14 = __pyx_v_self->nblocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { /* "pandas/_libs/sparse.pyx":555 * cum_len = 0 * for i from 0 <= i < self.nblocks: * if index >= locs[i] and index < locs[i] + lens[i]: # <<<<<<<<<<<<<< * return cum_len + index - locs[i] * cum_len += lens[i] */ __pyx_t_15 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 555, __pyx_L1_error) } __pyx_t_16 = ((__pyx_v_index >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_locs.diminfo[0].strides))) != 0); if (__pyx_t_16) { } else { __pyx_t_12 = __pyx_t_16; goto __pyx_L7_bool_binop_done; } __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 555, __pyx_L1_error) } __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_lens.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_lens.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 555, __pyx_L1_error) } __pyx_t_16 = ((__pyx_v_index < ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_locs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lens.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_lens.diminfo[0].strides)))) != 0); __pyx_t_12 = __pyx_t_16; __pyx_L7_bool_binop_done:; if (__pyx_t_12) { /* "pandas/_libs/sparse.pyx":556 * for i from 0 <= i < self.nblocks: * if index >= locs[i] and index < locs[i] + lens[i]: * return cum_len + index - locs[i] # <<<<<<<<<<<<<< * cum_len += lens[i] * */ __pyx_t_19 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_locs.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 556, __pyx_L1_error) } __pyx_r = ((__pyx_v_cum_len + __pyx_v_index) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_locs.diminfo[0].strides))); goto __pyx_L0; /* "pandas/_libs/sparse.pyx":555 * cum_len = 0 * for i from 0 <= i < self.nblocks: * if index >= locs[i] and index < locs[i] + lens[i]: # <<<<<<<<<<<<<< * return cum_len + index - locs[i] * cum_len += lens[i] */ } /* "pandas/_libs/sparse.pyx":557 * if index >= locs[i] and index < locs[i] + lens[i]: * return cum_len + index - locs[i] * cum_len += lens[i] # <<<<<<<<<<<<<< * * return -1 */ __pyx_t_20 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_lens.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_lens.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 557, __pyx_L1_error) } __pyx_v_cum_len = (__pyx_v_cum_len + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lens.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_lens.diminfo[0].strides))); } /* "pandas/_libs/sparse.pyx":559 * cum_len += lens[i] * * return -1 # <<<<<<<<<<<<<< * * @cython.wraparound(False) */ __pyx_r = -1L; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":536 * return BlockUnion(self, y.to_block_index()).result * * cpdef Py_ssize_t lookup(self, Py_ssize_t index): # <<<<<<<<<<<<<< * """ * Return the internal location if value exists on given index. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lens.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_WriteUnraisable("pandas._libs.sparse.BlockIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lens.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XDECREF((PyObject *)__pyx_v_lens); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static char __pyx_doc_6pandas_5_libs_6sparse_10BlockIndex_18lookup[] = "\n Return the internal location if value exists on given index.\n Return -1 otherwise.\n "; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_19lookup(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { Py_ssize_t __pyx_v_index; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup (wrapper)", 0); assert(__pyx_arg_index); { __pyx_v_index = __Pyx_PyIndex_AsSsize_t(__pyx_arg_index); if (unlikely((__pyx_v_index == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 536, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_18lookup(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self), ((Py_ssize_t)__pyx_v_index)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_18lookup(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, Py_ssize_t __pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("lookup", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_lookup(__pyx_v_self, __pyx_v_index, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":562 * * @cython.wraparound(False) * cpdef ndarray[int32_t] lookup_array(self, ndarray[ # <<<<<<<<<<<<<< * int32_t, ndim=1] indexer): * """ */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_21lookup_array(PyObject *__pyx_v_self, PyObject *__pyx_v_indexer); /*proto*/ static PyArrayObject *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_lookup_array(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_indexer, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_n; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_ind_val; PyArrayObject *__pyx_v_locs = 0; PyArrayObject *__pyx_v_lens = 0; PyArrayObject *__pyx_v_results = 0; PyObject *__pyx_v_cum_len = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_lens; __Pyx_Buffer __pyx_pybuffer_lens; __Pyx_LocalBuf_ND __pyx_pybuffernd_locs; __Pyx_Buffer __pyx_pybuffer_locs; __Pyx_LocalBuf_ND __pyx_pybuffernd_results; __Pyx_Buffer __pyx_pybuffer_results; PyArrayObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; PyArrayObject *__pyx_t_11 = NULL; int __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_t_14; __pyx_t_5numpy_int32_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; __pyx_t_5numpy_int32_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; __Pyx_RefNannySetupContext("lookup_array", 0); __pyx_pybuffer_locs.pybuffer.buf = NULL; __pyx_pybuffer_locs.refcount = 0; __pyx_pybuffernd_locs.data = NULL; __pyx_pybuffernd_locs.rcbuffer = &__pyx_pybuffer_locs; __pyx_pybuffer_lens.pybuffer.buf = NULL; __pyx_pybuffer_lens.refcount = 0; __pyx_pybuffernd_lens.data = NULL; __pyx_pybuffernd_lens.rcbuffer = &__pyx_pybuffer_lens; __pyx_pybuffer_results.pybuffer.buf = NULL; __pyx_pybuffer_results.refcount = 0; __pyx_pybuffernd_results.data = NULL; __pyx_pybuffernd_results.rcbuffer = &__pyx_pybuffer_results; __pyx_pybuffer_indexer.pybuffer.buf = NULL; __pyx_pybuffer_indexer.refcount = 0; __pyx_pybuffernd_indexer.data = NULL; __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 562, __pyx_L1_error) } __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0]; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lookup_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_21lookup_array)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_indexer)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_indexer)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_indexer)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indexer)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_indexer)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 562, __pyx_L1_error) __pyx_r = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":572 * ndarray[int32_t, ndim=1] results * * locs = self.blocs # <<<<<<<<<<<<<< * lens = self.blengths * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_v_locs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9); } __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0; } __pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 572, __pyx_L1_error) } __pyx_v_locs = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":573 * * locs = self.blocs * lens = self.blengths # <<<<<<<<<<<<<< * * n = len(indexer) */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blengths); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lens.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lens.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lens.rcbuffer->pybuffer, (PyObject*)__pyx_v_lens, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7); } __pyx_t_9 = __pyx_t_8 = __pyx_t_7 = 0; } __pyx_pybuffernd_lens.diminfo[0].strides = __pyx_pybuffernd_lens.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lens.diminfo[0].shape = __pyx_pybuffernd_lens.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 573, __pyx_L1_error) } __pyx_v_lens = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":575 * lens = self.blengths * * n = len(indexer) # <<<<<<<<<<<<<< * results = np.empty(n, dtype=np.int32) * results.fill(-1) */ __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 575, __pyx_L1_error) __pyx_v_n = __pyx_t_10; /* "pandas/_libs/sparse.pyx":576 * * n = len(indexer) * results = np.empty(n, dtype=np.int32) # <<<<<<<<<<<<<< * results.fill(-1) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 576, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_results.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_results.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_results.rcbuffer->pybuffer, (PyObject*)__pyx_v_results, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9); } __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0; } __pyx_pybuffernd_results.diminfo[0].strides = __pyx_pybuffernd_results.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_results.diminfo[0].shape = __pyx_pybuffernd_results.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 576, __pyx_L1_error) } __pyx_t_11 = 0; __pyx_v_results = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; /* "pandas/_libs/sparse.pyx":577 * n = len(indexer) * results = np.empty(n, dtype=np.int32) * results.fill(-1) # <<<<<<<<<<<<<< * * if self.npoints == 0: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_results), __pyx_n_s_fill); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":579 * results.fill(-1) * * if self.npoints == 0: # <<<<<<<<<<<<<< * return results * */ __pyx_t_12 = ((__pyx_v_self->npoints == 0) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse.pyx":580 * * if self.npoints == 0: * return results # <<<<<<<<<<<<<< * * for i from 0 <= i < n: */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_results)); __pyx_r = ((PyArrayObject *)__pyx_v_results); goto __pyx_L0; /* "pandas/_libs/sparse.pyx":579 * results.fill(-1) * * if self.npoints == 0: # <<<<<<<<<<<<<< * return results * */ } /* "pandas/_libs/sparse.pyx":582 * return results * * for i from 0 <= i < n: # <<<<<<<<<<<<<< * ind_val = indexer[i] * if not (ind_val < 0 or self.length <= ind_val): */ __pyx_t_10 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) { /* "pandas/_libs/sparse.pyx":583 * * for i from 0 <= i < n: * ind_val = indexer[i] # <<<<<<<<<<<<<< * if not (ind_val < 0 or self.length <= ind_val): * cum_len = 0 */ __pyx_t_13 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_13 < 0) { __pyx_t_6 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 583, __pyx_L1_error) } __pyx_v_ind_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indexer.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":584 * for i from 0 <= i < n: * ind_val = indexer[i] * if not (ind_val < 0 or self.length <= ind_val): # <<<<<<<<<<<<<< * cum_len = 0 * for j from 0 <= j < self.nblocks: */ __pyx_t_14 = ((__pyx_v_ind_val < 0) != 0); if (!__pyx_t_14) { } else { __pyx_t_12 = __pyx_t_14; goto __pyx_L7_bool_binop_done; } __pyx_t_14 = ((__pyx_v_self->length <= __pyx_v_ind_val) != 0); __pyx_t_12 = __pyx_t_14; __pyx_L7_bool_binop_done:; __pyx_t_14 = ((!__pyx_t_12) != 0); if (__pyx_t_14) { /* "pandas/_libs/sparse.pyx":585 * ind_val = indexer[i] * if not (ind_val < 0 or self.length <= ind_val): * cum_len = 0 # <<<<<<<<<<<<<< * for j from 0 <= j < self.nblocks: * if ind_val >= locs[j] and ind_val < locs[j] + lens[j]: */ __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_cum_len, __pyx_int_0); /* "pandas/_libs/sparse.pyx":586 * if not (ind_val < 0 or self.length <= ind_val): * cum_len = 0 * for j from 0 <= j < self.nblocks: # <<<<<<<<<<<<<< * if ind_val >= locs[j] and ind_val < locs[j] + lens[j]: * results[i] = cum_len + ind_val - locs[j] */ __pyx_t_15 = __pyx_v_self->nblocks; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) { /* "pandas/_libs/sparse.pyx":587 * cum_len = 0 * for j from 0 <= j < self.nblocks: * if ind_val >= locs[j] and ind_val < locs[j] + lens[j]: # <<<<<<<<<<<<<< * results[i] = cum_len + ind_val - locs[j] * cum_len += lens[j] */ __pyx_t_16 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_16 < 0) { __pyx_t_6 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 587, __pyx_L1_error) } __pyx_t_12 = ((__pyx_v_ind_val >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_locs.diminfo[0].strides))) != 0); if (__pyx_t_12) { } else { __pyx_t_14 = __pyx_t_12; goto __pyx_L12_bool_binop_done; } __pyx_t_17 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_17 < 0) { __pyx_t_6 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 587, __pyx_L1_error) } __pyx_t_18 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_18 < 0) { __pyx_t_6 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_lens.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 587, __pyx_L1_error) } __pyx_t_12 = ((__pyx_v_ind_val < ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_locs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lens.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_lens.diminfo[0].strides)))) != 0); __pyx_t_14 = __pyx_t_12; __pyx_L12_bool_binop_done:; if (__pyx_t_14) { /* "pandas/_libs/sparse.pyx":588 * for j from 0 <= j < self.nblocks: * if ind_val >= locs[j] and ind_val < locs[j] + lens[j]: * results[i] = cum_len + ind_val - locs[j] # <<<<<<<<<<<<<< * cum_len += lens[j] * return results */ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_ind_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyNumber_Add(__pyx_v_cum_len, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_19 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_19 < 0) { __pyx_t_6 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 588, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_From_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_locs.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_20 = __Pyx_PyInt_As_npy_int32(__pyx_t_3); if (unlikely((__pyx_t_20 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_21 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_21 < 0) { __pyx_t_6 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_results.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 588, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_results.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_results.diminfo[0].strides) = __pyx_t_20; /* "pandas/_libs/sparse.pyx":587 * cum_len = 0 * for j from 0 <= j < self.nblocks: * if ind_val >= locs[j] and ind_val < locs[j] + lens[j]: # <<<<<<<<<<<<<< * results[i] = cum_len + ind_val - locs[j] * cum_len += lens[j] */ } /* "pandas/_libs/sparse.pyx":589 * if ind_val >= locs[j] and ind_val < locs[j] + lens[j]: * results[i] = cum_len + ind_val - locs[j] * cum_len += lens[j] # <<<<<<<<<<<<<< * return results * */ __pyx_t_22 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_22 < 0) { __pyx_t_6 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_lens.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 589, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyInt_From_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lens.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lens.diminfo[0].strides))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_cum_len, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_cum_len, __pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":584 * for i from 0 <= i < n: * ind_val = indexer[i] * if not (ind_val < 0 or self.length <= ind_val): # <<<<<<<<<<<<<< * cum_len = 0 * for j from 0 <= j < self.nblocks: */ } } /* "pandas/_libs/sparse.pyx":590 * results[i] = cum_len + ind_val - locs[j] * cum_len += lens[j] * return results # <<<<<<<<<<<<<< * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_results)); __pyx_r = ((PyArrayObject *)__pyx_v_results); goto __pyx_L0; /* "pandas/_libs/sparse.pyx":562 * * @cython.wraparound(False) * cpdef ndarray[int32_t] lookup_array(self, ndarray[ # <<<<<<<<<<<<<< * int32_t, ndim=1] indexer): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lens.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_results.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.lookup_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lens.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_results.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_locs); __Pyx_XDECREF((PyObject *)__pyx_v_lens); __Pyx_XDECREF((PyObject *)__pyx_v_results); __Pyx_XDECREF(__pyx_v_cum_len); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_21lookup_array(PyObject *__pyx_v_self, PyObject *__pyx_v_indexer); /*proto*/ static char __pyx_doc_6pandas_5_libs_6sparse_10BlockIndex_20lookup_array[] = "\n Vectorized lookup, returns ndarray[int32_t]\n "; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_21lookup_array(PyObject *__pyx_v_self, PyObject *__pyx_v_indexer) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lookup_array (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) __PYX_ERR(0, 562, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_20lookup_array(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self), ((PyArrayObject *)__pyx_v_indexer)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_20lookup_array(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_indexer) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("lookup_array", 0); __pyx_pybuffer_indexer.pybuffer.buf = NULL; __pyx_pybuffer_indexer.refcount = 0; __pyx_pybuffernd_indexer.data = NULL; __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 562, __pyx_L1_error) } __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_lookup_array(__pyx_v_self, __pyx_v_indexer, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.lookup_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":592 * return results * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * float64_t fill_value, SparseIndex other_): * cdef: */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyArrayObject *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_reindex(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other_, int __pyx_skip_dispatch) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_j; Py_ssize_t __pyx_v_ocur; CYTHON_UNUSED Py_ssize_t __pyx_v_ocurlen; struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_other = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_result = 0; PyArrayObject *__pyx_v_slocs = 0; PyArrayObject *__pyx_v_slens = 0; PyArrayObject *__pyx_v_olocs = 0; PyArrayObject *__pyx_v_olens = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_olens; __Pyx_Buffer __pyx_pybuffer_olens; __Pyx_LocalBuf_ND __pyx_pybuffernd_olocs; __Pyx_Buffer __pyx_pybuffer_olocs; __Pyx_LocalBuf_ND __pyx_pybuffernd_result; __Pyx_Buffer __pyx_pybuffer_result; __Pyx_LocalBuf_ND __pyx_pybuffernd_slens; __Pyx_Buffer __pyx_pybuffer_slens; __Pyx_LocalBuf_ND __pyx_pybuffernd_slocs; __Pyx_Buffer __pyx_pybuffer_slocs; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyArrayObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyArrayObject *__pyx_t_11 = NULL; __pyx_t_5numpy_int32_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_t_17; __Pyx_RefNannySetupContext("reindex", 0); __pyx_pybuffer_result.pybuffer.buf = NULL; __pyx_pybuffer_result.refcount = 0; __pyx_pybuffernd_result.data = NULL; __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; __pyx_pybuffer_slocs.pybuffer.buf = NULL; __pyx_pybuffer_slocs.refcount = 0; __pyx_pybuffernd_slocs.data = NULL; __pyx_pybuffernd_slocs.rcbuffer = &__pyx_pybuffer_slocs; __pyx_pybuffer_slens.pybuffer.buf = NULL; __pyx_pybuffer_slens.refcount = 0; __pyx_pybuffernd_slens.data = NULL; __pyx_pybuffernd_slens.rcbuffer = &__pyx_pybuffer_slens; __pyx_pybuffer_olocs.pybuffer.buf = NULL; __pyx_pybuffer_olocs.refcount = 0; __pyx_pybuffernd_olocs.data = NULL; __pyx_pybuffernd_olocs.rcbuffer = &__pyx_pybuffer_olocs; __pyx_pybuffer_olens.pybuffer.buf = NULL; __pyx_pybuffer_olens.refcount = 0; __pyx_pybuffernd_olens.data = NULL; __pyx_pybuffernd_olens.rcbuffer = &__pyx_pybuffer_olens; __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 592, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reindex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_23reindex)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_3 = PyFloat_FromDouble(__pyx_v_fill_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_values), __pyx_t_3, ((PyObject *)__pyx_v_other_)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_values), __pyx_t_3, ((PyObject *)__pyx_v_other_)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_other_)); __Pyx_GIVEREF(((PyObject *)__pyx_v_other_)); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)__pyx_v_other_)); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 592, __pyx_L1_error) __pyx_r = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":595 * float64_t fill_value, SparseIndex other_): * cdef: * Py_ssize_t i = 0, j = 0, ocur, ocurlen # <<<<<<<<<<<<<< * BlockIndex other * ndarray[float64_t, ndim=1] result */ __pyx_v_i = 0; __pyx_v_j = 0; /* "pandas/_libs/sparse.pyx":600 * ndarray[int32_t, ndim=1] slocs, slens, olocs, olens * * other = other_.to_block_index() # <<<<<<<<<<<<<< * * olocs = other.blocs */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other_), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(0, 600, __pyx_L1_error) __pyx_v_other = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":602 * other = other_.to_block_index() * * olocs = other.blocs # <<<<<<<<<<<<<< * olens = other.blengths * slocs = self.blocs */ __pyx_t_1 = ((PyObject *)__pyx_v_other->blocs); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_olocs.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_olocs.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_olocs.rcbuffer->pybuffer, (PyObject*)__pyx_v_olocs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_olocs.diminfo[0].strides = __pyx_pybuffernd_olocs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_olocs.diminfo[0].shape = __pyx_pybuffernd_olocs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 602, __pyx_L1_error) } __pyx_v_olocs = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":603 * * olocs = other.blocs * olens = other.blengths # <<<<<<<<<<<<<< * slocs = self.blocs * slens = self.blengths */ __pyx_t_1 = ((PyObject *)__pyx_v_other->blengths); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_olens.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_olens.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_olens.rcbuffer->pybuffer, (PyObject*)__pyx_v_olens, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_olens.diminfo[0].strides = __pyx_pybuffernd_olens.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_olens.diminfo[0].shape = __pyx_pybuffernd_olens.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 603, __pyx_L1_error) } __pyx_v_olens = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":604 * olocs = other.blocs * olens = other.blengths * slocs = self.blocs # <<<<<<<<<<<<<< * slens = self.blengths * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blocs); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_slocs.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_slocs.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_slocs.rcbuffer->pybuffer, (PyObject*)__pyx_v_slocs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_slocs.diminfo[0].strides = __pyx_pybuffernd_slocs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_slocs.diminfo[0].shape = __pyx_pybuffernd_slocs.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 604, __pyx_L1_error) } __pyx_v_slocs = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":605 * olens = other.blengths * slocs = self.blocs * slens = self.blengths # <<<<<<<<<<<<<< * * result = np.empty(other.npoints, dtype=np.float64) */ __pyx_t_1 = ((PyObject *)__pyx_v_self->blengths); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_slens.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_slens.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_slens.rcbuffer->pybuffer, (PyObject*)__pyx_v_slens, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8); } __pyx_t_10 = __pyx_t_9 = __pyx_t_8 = 0; } __pyx_pybuffernd_slens.diminfo[0].strides = __pyx_pybuffernd_slens.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_slens.diminfo[0].shape = __pyx_pybuffernd_slens.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 605, __pyx_L1_error) } __pyx_v_slens = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":607 * slens = self.blengths * * result = np.empty(other.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * for 0 <= i < other.nblocks: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_other->npoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 607, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 607, __pyx_L1_error) } __pyx_t_11 = 0; __pyx_v_result = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; /* "pandas/_libs/sparse.pyx":609 * result = np.empty(other.npoints, dtype=np.float64) * * for 0 <= i < other.nblocks: # <<<<<<<<<<<<<< * ocur = olocs[i] * ocurlen = olens[i] */ __pyx_t_12 = __pyx_v_other->nblocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "pandas/_libs/sparse.pyx":610 * * for 0 <= i < other.nblocks: * ocur = olocs[i] # <<<<<<<<<<<<<< * ocurlen = olens[i] * */ __pyx_t_13 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_13 < 0) { __pyx_t_13 += __pyx_pybuffernd_olocs.diminfo[0].shape; if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_olocs.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 610, __pyx_L1_error) } __pyx_v_ocur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_olocs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_olocs.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":611 * for 0 <= i < other.nblocks: * ocur = olocs[i] * ocurlen = olens[i] # <<<<<<<<<<<<<< * * while slocs[j] + slens[j] < ocur: */ __pyx_t_14 = __pyx_v_i; __pyx_t_6 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_olens.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_olens.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 611, __pyx_L1_error) } __pyx_v_ocurlen = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_olens.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_olens.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":613 * ocurlen = olens[i] * * while slocs[j] + slens[j] < ocur: # <<<<<<<<<<<<<< * j += 1 * */ while (1) { __pyx_t_15 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_15 < 0) { __pyx_t_15 += __pyx_pybuffernd_slocs.diminfo[0].shape; if (unlikely(__pyx_t_15 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_slocs.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 613, __pyx_L1_error) } __pyx_t_16 = __pyx_v_j; __pyx_t_6 = -1; if (__pyx_t_16 < 0) { __pyx_t_16 += __pyx_pybuffernd_slens.diminfo[0].shape; if (unlikely(__pyx_t_16 < 0)) __pyx_t_6 = 0; } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_slens.diminfo[0].shape)) __pyx_t_6 = 0; if (unlikely(__pyx_t_6 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_6); __PYX_ERR(0, 613, __pyx_L1_error) } __pyx_t_17 = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_slocs.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_slocs.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_slens.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_slens.diminfo[0].strides))) < __pyx_v_ocur) != 0); if (!__pyx_t_17) break; /* "pandas/_libs/sparse.pyx":614 * * while slocs[j] + slens[j] < ocur: * j += 1 # <<<<<<<<<<<<<< * * cpdef put(self, ndarray[float64_t, ndim=1] values, */ __pyx_v_j = (__pyx_v_j + 1); } } /* "pandas/_libs/sparse.pyx":592 * return results * * cpdef ndarray reindex(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * float64_t fill_value, SparseIndex other_): * cdef: */ /* function exit code */ __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_olens.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_olocs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_slens.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_slocs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.reindex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_olens.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_olocs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_slens.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_slocs.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_other); __Pyx_XDECREF((PyObject *)__pyx_v_result); __Pyx_XDECREF((PyObject *)__pyx_v_slocs); __Pyx_XDECREF((PyObject *)__pyx_v_slens); __Pyx_XDECREF((PyObject *)__pyx_v_olocs); __Pyx_XDECREF((PyObject *)__pyx_v_olens); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_23reindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; __pyx_t_5numpy_float64_t __pyx_v_fill_value; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other_ = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reindex (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_fill_value,&__pyx_n_s_other,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 1); __PYX_ERR(0, 592, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 2); __PYX_ERR(0, 592, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reindex") < 0)) __PYX_ERR(0, 592, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_fill_value = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fill_value == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 593, __pyx_L3_error) __pyx_v_other_ = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 592, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.reindex", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) __PYX_ERR(0, 592, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other_), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "other_", 0))) __PYX_ERR(0, 593, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_22reindex(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_fill_value, __pyx_v_other_); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_22reindex(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_fill_value, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_other_) { __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("reindex", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 592, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_reindex(__pyx_v_self, __pyx_v_values, __pyx_v_fill_value, __pyx_v_other_, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.reindex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":616 * j += 1 * * cpdef put(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices, object to_put): * pass */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_put(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyArrayObject *__pyx_v_indices, CYTHON_UNUSED PyObject *__pyx_v_to_put, int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("put", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 616, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 616, __pyx_L1_error) } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_25put)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_values), ((PyObject *)__pyx_v_indices), __pyx_v_to_put}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_values), ((PyObject *)__pyx_v_indices), __pyx_v_to_put}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_indices)); __Pyx_INCREF(__pyx_v_to_put); __Pyx_GIVEREF(__pyx_v_to_put); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_to_put); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":618 * cpdef put(self, ndarray[float64_t, ndim=1] values, * ndarray[int32_t, ndim=1] indices, object to_put): * pass # <<<<<<<<<<<<<< * * cpdef take(self, ndarray[float64_t, ndim=1] values, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":616 * j += 1 * * cpdef put(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices, object to_put): * pass */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_25put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indices = 0; PyObject *__pyx_v_to_put = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("put (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indices,&__pyx_n_s_to_put,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 1); __PYX_ERR(0, 616, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to_put)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, 2); __PYX_ERR(0, 616, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "put") < 0)) __PYX_ERR(0, 616, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indices = ((PyArrayObject *)values[1]); __pyx_v_to_put = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("put", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 616, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.put", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) __PYX_ERR(0, 616, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) __PYX_ERR(0, 617, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_24put(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_indices, __pyx_v_to_put); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_24put(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices, PyObject *__pyx_v_to_put) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("put", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 616, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 616, __pyx_L1_error) } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_10BlockIndex_put(__pyx_v_self, __pyx_v_values, __pyx_v_indices, __pyx_v_to_put, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":620 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_take(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED PyArrayObject *__pyx_v_indices, int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("take", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 620, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 620, __pyx_L1_error) } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_take); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_27take)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_values), ((PyObject *)__pyx_v_indices)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_values), ((PyObject *)__pyx_v_indices)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_values)); __Pyx_INCREF(((PyObject *)__pyx_v_indices)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indices)); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_indices)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "pandas/_libs/sparse.pyx":622 * cpdef take(self, ndarray[float64_t, ndim=1] values, * ndarray[int32_t, ndim=1] indices): * pass # <<<<<<<<<<<<<< * * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.take", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":620 * pass * * cpdef take(self, ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * ndarray[int32_t, ndim=1] indices): * pass */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_27take(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyArrayObject *__pyx_v_indices = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("take (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_indices,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indices)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("take", 1, 2, 2, 1); __PYX_ERR(0, 620, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take") < 0)) __PYX_ERR(0, 620, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_indices = ((PyArrayObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("take", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 620, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.take", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) __PYX_ERR(0, 620, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) __PYX_ERR(0, 621, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_26take(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self), __pyx_v_values, __pyx_v_indices); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_26take(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indices) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indices; __Pyx_Buffer __pyx_pybuffer_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("take", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; __pyx_pybuffer_indices.pybuffer.buf = NULL; __pyx_pybuffer_indices.refcount = 0; __pyx_pybuffernd_indices.data = NULL; __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 620, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 620, __pyx_L1_error) } __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_10BlockIndex_take(__pyx_v_self, __pyx_v_values, __pyx_v_indices, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.take", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":328 * """ * cdef readonly: * int32_t nblocks, npoints, length # <<<<<<<<<<<<<< * ndarray blocs, blengths * */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7nblocks_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7nblocks_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_7nblocks___get__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_7nblocks___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->nblocks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.nblocks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7npoints_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7npoints_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_7npoints___get__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_7npoints___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->npoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.npoints.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_6length_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_6length_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_6length___get__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_6length___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockIndex.length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":329 * cdef readonly: * int32_t nblocks, npoints, length * ndarray blocs, blengths # <<<<<<<<<<<<<< * * cdef: */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_5blocs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_5blocs_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_5blocs___get__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_5blocs___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->blocs)); __pyx_r = ((PyObject *)__pyx_v_self->blocs); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_8blengths_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_8blengths_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_8blengths___get__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockIndex_8blengths___get__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->blengths)); __pyx_r = ((PyObject *)__pyx_v_self->blengths); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":635 * int32_t xi, yi # block indices * * def __init__(self, BlockIndex x, BlockIndex y): # <<<<<<<<<<<<<< * self.x = x * self.y = y */ /* Python wrapper */ static int __pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_y = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 635, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 635, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_x = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)values[0]); __pyx_v_y = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 635, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.BlockMerge.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex, 1, "x", 0))) __PYX_ERR(0, 635, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex, 1, "y", 0))) __PYX_ERR(0, 635, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockMerge___init__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)__pyx_v_self), __pyx_v_x, __pyx_v_y); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6pandas_5_libs_6sparse_10BlockMerge___init__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v_self, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_y) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__init__", 0); /* "pandas/_libs/sparse.pyx":636 * * def __init__(self, BlockIndex x, BlockIndex y): * self.x = x # <<<<<<<<<<<<<< * self.y = y * */ __Pyx_INCREF(((PyObject *)__pyx_v_x)); __Pyx_GIVEREF(((PyObject *)__pyx_v_x)); __Pyx_GOTREF(__pyx_v_self->x); __Pyx_DECREF(((PyObject *)__pyx_v_self->x)); __pyx_v_self->x = __pyx_v_x; /* "pandas/_libs/sparse.pyx":637 * def __init__(self, BlockIndex x, BlockIndex y): * self.x = x * self.y = y # <<<<<<<<<<<<<< * * if x.length != y.length: */ __Pyx_INCREF(((PyObject *)__pyx_v_y)); __Pyx_GIVEREF(((PyObject *)__pyx_v_y)); __Pyx_GOTREF(__pyx_v_self->y); __Pyx_DECREF(((PyObject *)__pyx_v_self->y)); __pyx_v_self->y = __pyx_v_y; /* "pandas/_libs/sparse.pyx":639 * self.y = y * * if x.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ __pyx_t_1 = ((__pyx_v_x->length != __pyx_v_y->length) != 0); if (unlikely(__pyx_t_1)) { /* "pandas/_libs/sparse.pyx":640 * * if x.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * self.xstart = self.x.blocs */ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 640, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":639 * self.y = y * * if x.length != y.length: # <<<<<<<<<<<<<< * raise Exception('Indices must reference same underlying length') * */ } /* "pandas/_libs/sparse.pyx":642 * raise Exception('Indices must reference same underlying length') * * self.xstart = self.x.blocs # <<<<<<<<<<<<<< * self.ystart = self.y.blocs * */ __pyx_t_2 = ((PyObject *)__pyx_v_self->x->blocs); __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->xstart); __Pyx_DECREF(((PyObject *)__pyx_v_self->xstart)); __pyx_v_self->xstart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":643 * * self.xstart = self.x.blocs * self.ystart = self.y.blocs # <<<<<<<<<<<<<< * * self.xend = self.x.blocs + self.x.blengths */ __pyx_t_2 = ((PyObject *)__pyx_v_self->y->blocs); __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->ystart); __Pyx_DECREF(((PyObject *)__pyx_v_self->ystart)); __pyx_v_self->ystart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":645 * self.ystart = self.y.blocs * * self.xend = self.x.blocs + self.x.blengths # <<<<<<<<<<<<<< * self.yend = self.y.blocs + self.y.blengths * */ __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_self->x->blocs), ((PyObject *)__pyx_v_self->x->blengths)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->xend); __Pyx_DECREF(((PyObject *)__pyx_v_self->xend)); __pyx_v_self->xend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":646 * * self.xend = self.x.blocs + self.x.blengths * self.yend = self.y.blocs + self.y.blengths # <<<<<<<<<<<<<< * * # self.xlen = self.x.blengths */ __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_self->y->blocs), ((PyObject *)__pyx_v_self->y->blengths)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->yend); __Pyx_DECREF(((PyObject *)__pyx_v_self->yend)); __pyx_v_self->yend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":651 * # self.ylen = self.y.blengths * * self.xi = 0 # <<<<<<<<<<<<<< * self.yi = 0 * */ __pyx_v_self->xi = 0; /* "pandas/_libs/sparse.pyx":652 * * self.xi = 0 * self.yi = 0 # <<<<<<<<<<<<<< * * self.result = self._make_merged_blocks() */ __pyx_v_self->yi = 0; /* "pandas/_libs/sparse.pyx":654 * self.yi = 0 * * self.result = self._make_merged_blocks() # <<<<<<<<<<<<<< * * cdef _make_merged_blocks(self): */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockMerge *)__pyx_v_self->__pyx_vtab)->_make_merged_blocks(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->result); __Pyx_DECREF(((PyObject *)__pyx_v_self->result)); __pyx_v_self->result = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":635 * int32_t xi, yi # block indices * * def __init__(self, BlockIndex x, BlockIndex y): # <<<<<<<<<<<<<< * self.x = x * self.y = y */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pandas._libs.sparse.BlockMerge.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":656 * self.result = self._make_merged_blocks() * * cdef _make_merged_blocks(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockMerge__make_merged_blocks(CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_make_merged_blocks", 0); /* "pandas/_libs/sparse.pyx":657 * * cdef _make_merged_blocks(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * cdef _set_current_indices(self, int32_t xi, int32_t yi, bint mode): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(0, 657, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":656 * self.result = self._make_merged_blocks() * * cdef _make_merged_blocks(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("pandas._libs.sparse.BlockMerge._make_merged_blocks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":659 * raise NotImplementedError * * cdef _set_current_indices(self, int32_t xi, int32_t yi, bint mode): # <<<<<<<<<<<<<< * if mode == 0: * self.xi = xi */ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockMerge__set_current_indices(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_xi, __pyx_t_5numpy_int32_t __pyx_v_yi, int __pyx_v_mode) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_set_current_indices", 0); /* "pandas/_libs/sparse.pyx":660 * * cdef _set_current_indices(self, int32_t xi, int32_t yi, bint mode): * if mode == 0: # <<<<<<<<<<<<<< * self.xi = xi * self.yi = yi */ __pyx_t_1 = ((__pyx_v_mode == 0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse.pyx":661 * cdef _set_current_indices(self, int32_t xi, int32_t yi, bint mode): * if mode == 0: * self.xi = xi # <<<<<<<<<<<<<< * self.yi = yi * else: */ __pyx_v_self->xi = __pyx_v_xi; /* "pandas/_libs/sparse.pyx":662 * if mode == 0: * self.xi = xi * self.yi = yi # <<<<<<<<<<<<<< * else: * self.xi = yi */ __pyx_v_self->yi = __pyx_v_yi; /* "pandas/_libs/sparse.pyx":660 * * cdef _set_current_indices(self, int32_t xi, int32_t yi, bint mode): * if mode == 0: # <<<<<<<<<<<<<< * self.xi = xi * self.yi = yi */ goto __pyx_L3; } /* "pandas/_libs/sparse.pyx":664 * self.yi = yi * else: * self.xi = yi # <<<<<<<<<<<<<< * self.yi = xi * */ /*else*/ { __pyx_v_self->xi = __pyx_v_yi; /* "pandas/_libs/sparse.pyx":665 * else: * self.xi = yi * self.yi = xi # <<<<<<<<<<<<<< * * cdef class BlockIntersection(BlockMerge): */ __pyx_v_self->yi = __pyx_v_xi; } __pyx_L3:; /* "pandas/_libs/sparse.pyx":659 * raise NotImplementedError * * cdef _set_current_indices(self, int32_t xi, int32_t yi, bint mode): # <<<<<<<<<<<<<< * if mode == 0: * self.xi = xi */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockMerge_2__reduce_cython__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockMerge_2__reduce_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v_self) { int __pyx_v_use_setstate; PyObject *__pyx_v_state = NULL; PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":3 * def __reduce_cython__(self): * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->xi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->yi); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(11); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self->result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->result)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->result)); __Pyx_INCREF(((PyObject *)__pyx_v_self->x)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->x)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->x)); __Pyx_INCREF(((PyObject *)__pyx_v_self->xend)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->xend)); PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->xend)); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->xlen)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->xlen)); PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->xlen)); __Pyx_INCREF(((PyObject *)__pyx_v_self->xstart)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->xstart)); PyTuple_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_v_self->xstart)); __Pyx_INCREF(((PyObject *)__pyx_v_self->y)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->y)); PyTuple_SET_ITEM(__pyx_t_3, 6, ((PyObject *)__pyx_v_self->y)); __Pyx_INCREF(((PyObject *)__pyx_v_self->yend)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->yend)); PyTuple_SET_ITEM(__pyx_t_3, 7, ((PyObject *)__pyx_v_self->yend)); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self->ylen)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->ylen)); PyTuple_SET_ITEM(__pyx_t_3, 9, ((PyObject *)__pyx_v_self->ylen)); __Pyx_INCREF(((PyObject *)__pyx_v_self->ystart)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->ystart)); PyTuple_SET_ITEM(__pyx_t_3, 10, ((PyObject *)__pyx_v_self->ystart)); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_v_state = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":4 * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v__dict = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":5 * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_4 = (__pyx_v__dict != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "(tree fragment)":6 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict); __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "(tree fragment)":7 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":5 * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":9 * use_setstate = True * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_BlockMerge, (type(self), 0x0ce6794, None), state */ /*else*/ { __pyx_t_4 = (((PyObject *)__pyx_v_self->result) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->x) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->xend) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->xlen) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->xstart) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->y) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->yend) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->ylen) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->ystart) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); __pyx_t_5 = __pyx_t_6; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_5; } __pyx_L3:; /* "(tree fragment)":10 * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_BlockMerge, (type(self), 0x0ce6794, None), state * else: */ __pyx_t_5 = (__pyx_v_use_setstate != 0); if (__pyx_t_5) { /* "(tree fragment)":11 * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None * if use_setstate: * return __pyx_unpickle_BlockMerge, (type(self), 0x0ce6794, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_BlockMerge, (type(self), 0x0ce6794, state) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BlockMerge); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_13526932); __Pyx_GIVEREF(__pyx_int_13526932); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_13526932); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "(tree fragment)":10 * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_BlockMerge, (type(self), 0x0ce6794, None), state * else: */ } /* "(tree fragment)":13 * return __pyx_unpickle_BlockMerge, (type(self), 0x0ce6794, None), state * else: * return __pyx_unpickle_BlockMerge, (type(self), 0x0ce6794, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_BlockMerge__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BlockMerge); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_13526932); __Pyx_GIVEREF(__pyx_int_13526932); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_13526932); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas._libs.sparse.BlockMerge.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":14 * else: * return __pyx_unpickle_BlockMerge, (type(self), 0x0ce6794, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_BlockMerge__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockMerge_4__setstate_cython__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockMerge_4__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":15 * return __pyx_unpickle_BlockMerge, (type(self), 0x0ce6794, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_BlockMerge__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 15, __pyx_L1_error) __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockMerge__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":14 * else: * return __pyx_unpickle_BlockMerge, (type(self), 0x0ce6794, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_BlockMerge__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockMerge.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_17BlockIntersection_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_17BlockIntersection_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_17BlockIntersection___reduce_cython__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_17BlockIntersection___reduce_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *__pyx_v_self) { int __pyx_v_use_setstate; PyObject *__pyx_v_state = NULL; PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":3 * def __reduce_cython__(self): * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->__pyx_base.xi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->__pyx_base.yi); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(11); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.result)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->__pyx_base.result)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.x)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.x)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base.x)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.xend)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.xend)); PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->__pyx_base.xend)); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.xlen)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.xlen)); PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.xlen)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.xstart)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.xstart)); PyTuple_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_v_self->__pyx_base.xstart)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.y)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.y)); PyTuple_SET_ITEM(__pyx_t_3, 6, ((PyObject *)__pyx_v_self->__pyx_base.y)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.yend)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.yend)); PyTuple_SET_ITEM(__pyx_t_3, 7, ((PyObject *)__pyx_v_self->__pyx_base.yend)); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.ylen)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.ylen)); PyTuple_SET_ITEM(__pyx_t_3, 9, ((PyObject *)__pyx_v_self->__pyx_base.ylen)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.ystart)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.ystart)); PyTuple_SET_ITEM(__pyx_t_3, 10, ((PyObject *)__pyx_v_self->__pyx_base.ystart)); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_v_state = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":4 * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v__dict = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":5 * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_4 = (__pyx_v__dict != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "(tree fragment)":6 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict); __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "(tree fragment)":7 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":5 * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":9 * use_setstate = True * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_BlockIntersection, (type(self), 0x0ce6794, None), state */ /*else*/ { __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.result) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.x) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.xend) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.xlen) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.xstart) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.y) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.yend) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.ylen) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.ystart) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); __pyx_t_5 = __pyx_t_6; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_5; } __pyx_L3:; /* "(tree fragment)":10 * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_BlockIntersection, (type(self), 0x0ce6794, None), state * else: */ __pyx_t_5 = (__pyx_v_use_setstate != 0); if (__pyx_t_5) { /* "(tree fragment)":11 * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None * if use_setstate: * return __pyx_unpickle_BlockIntersection, (type(self), 0x0ce6794, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_BlockIntersection, (type(self), 0x0ce6794, state) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BlockIntersection); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_13526932); __Pyx_GIVEREF(__pyx_int_13526932); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_13526932); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "(tree fragment)":10 * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_BlockIntersection, (type(self), 0x0ce6794, None), state * else: */ } /* "(tree fragment)":13 * return __pyx_unpickle_BlockIntersection, (type(self), 0x0ce6794, None), state * else: * return __pyx_unpickle_BlockIntersection, (type(self), 0x0ce6794, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_BlockIntersection__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BlockIntersection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_13526932); __Pyx_GIVEREF(__pyx_int_13526932); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_13526932); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas._libs.sparse.BlockIntersection.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":14 * else: * return __pyx_unpickle_BlockIntersection, (type(self), 0x0ce6794, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_BlockIntersection__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_17BlockIntersection_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_17BlockIntersection_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_17BlockIntersection_2__setstate_cython__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_17BlockIntersection_2__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":15 * return __pyx_unpickle_BlockIntersection, (type(self), 0x0ce6794, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_BlockIntersection__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 15, __pyx_L1_error) __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockIntersection__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":14 * else: * return __pyx_unpickle_BlockIntersection, (type(self), 0x0ce6794, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_BlockIntersection__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockIntersection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":679 * """ * * cdef _make_merged_blocks(self): # <<<<<<<<<<<<<< * cdef: * ndarray[int32_t, ndim=1] xstart, xend, ystart */ static PyObject *__pyx_f_6pandas_5_libs_6sparse_10BlockUnion__make_merged_blocks(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *__pyx_v_self) { PyArrayObject *__pyx_v_xstart = 0; PyArrayObject *__pyx_v_xend = 0; PyArrayObject *__pyx_v_ystart = 0; PyArrayObject *__pyx_v_yend = 0; PyArrayObject *__pyx_v_out_bloc = 0; PyArrayObject *__pyx_v_out_blen = 0; __pyx_t_5numpy_int32_t __pyx_v_nstart; __pyx_t_5numpy_int32_t __pyx_v_nend; Py_ssize_t __pyx_v_max_len; Py_ssize_t __pyx_v_result_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_blen; __Pyx_Buffer __pyx_pybuffer_out_blen; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_bloc; __Pyx_Buffer __pyx_pybuffer_out_bloc; __Pyx_LocalBuf_ND __pyx_pybuffernd_xend; __Pyx_Buffer __pyx_pybuffer_xend; __Pyx_LocalBuf_ND __pyx_pybuffernd_xstart; __Pyx_Buffer __pyx_pybuffer_xstart; __Pyx_LocalBuf_ND __pyx_pybuffernd_yend; __Pyx_Buffer __pyx_pybuffer_yend; __Pyx_LocalBuf_ND __pyx_pybuffernd_ystart; __Pyx_Buffer __pyx_pybuffer_ystart; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __pyx_t_5numpy_int32_t __pyx_t_6; __pyx_t_5numpy_int32_t __pyx_t_7; __pyx_t_5numpy_int32_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyArrayObject *__pyx_t_14 = NULL; int __pyx_t_15; int __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; Py_ssize_t __pyx_t_26; __Pyx_RefNannySetupContext("_make_merged_blocks", 0); __pyx_pybuffer_xstart.pybuffer.buf = NULL; __pyx_pybuffer_xstart.refcount = 0; __pyx_pybuffernd_xstart.data = NULL; __pyx_pybuffernd_xstart.rcbuffer = &__pyx_pybuffer_xstart; __pyx_pybuffer_xend.pybuffer.buf = NULL; __pyx_pybuffer_xend.refcount = 0; __pyx_pybuffernd_xend.data = NULL; __pyx_pybuffernd_xend.rcbuffer = &__pyx_pybuffer_xend; __pyx_pybuffer_ystart.pybuffer.buf = NULL; __pyx_pybuffer_ystart.refcount = 0; __pyx_pybuffernd_ystart.data = NULL; __pyx_pybuffernd_ystart.rcbuffer = &__pyx_pybuffer_ystart; __pyx_pybuffer_yend.pybuffer.buf = NULL; __pyx_pybuffer_yend.refcount = 0; __pyx_pybuffernd_yend.data = NULL; __pyx_pybuffernd_yend.rcbuffer = &__pyx_pybuffer_yend; __pyx_pybuffer_out_bloc.pybuffer.buf = NULL; __pyx_pybuffer_out_bloc.refcount = 0; __pyx_pybuffernd_out_bloc.data = NULL; __pyx_pybuffernd_out_bloc.rcbuffer = &__pyx_pybuffer_out_bloc; __pyx_pybuffer_out_blen.pybuffer.buf = NULL; __pyx_pybuffer_out_blen.refcount = 0; __pyx_pybuffernd_out_blen.data = NULL; __pyx_pybuffernd_out_blen.rcbuffer = &__pyx_pybuffer_out_blen; /* "pandas/_libs/sparse.pyx":684 * ndarray[int32_t, ndim=1] yend, out_bloc, out_blen * int32_t nstart, nend, diff * Py_ssize_t max_len, result_indexer = 0 # <<<<<<<<<<<<<< * * xstart = self.xstart */ __pyx_v_result_indexer = 0; /* "pandas/_libs/sparse.pyx":686 * Py_ssize_t max_len, result_indexer = 0 * * xstart = self.xstart # <<<<<<<<<<<<<< * xend = self.xend * ystart = self.ystart */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.xstart); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_2 < 0)) { PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer, (PyObject*)__pyx_v_xstart, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5); } __pyx_t_3 = __pyx_t_4 = __pyx_t_5 = 0; } __pyx_pybuffernd_xstart.diminfo[0].strides = __pyx_pybuffernd_xstart.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xstart.diminfo[0].shape = __pyx_pybuffernd_xstart.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 686, __pyx_L1_error) } __pyx_v_xstart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":687 * * xstart = self.xstart * xend = self.xend # <<<<<<<<<<<<<< * ystart = self.ystart * yend = self.yend */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.xend); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xend.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xend.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_2 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xend.rcbuffer->pybuffer, (PyObject*)__pyx_v_xend, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_4, __pyx_t_3); } __pyx_t_5 = __pyx_t_4 = __pyx_t_3 = 0; } __pyx_pybuffernd_xend.diminfo[0].strides = __pyx_pybuffernd_xend.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xend.diminfo[0].shape = __pyx_pybuffernd_xend.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 687, __pyx_L1_error) } __pyx_v_xend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":688 * xstart = self.xstart * xend = self.xend * ystart = self.ystart # <<<<<<<<<<<<<< * yend = self.yend * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.ystart); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_2 < 0)) { PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer, (PyObject*)__pyx_v_ystart, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5); } __pyx_t_3 = __pyx_t_4 = __pyx_t_5 = 0; } __pyx_pybuffernd_ystart.diminfo[0].strides = __pyx_pybuffernd_ystart.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ystart.diminfo[0].shape = __pyx_pybuffernd_ystart.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 688, __pyx_L1_error) } __pyx_v_ystart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":689 * xend = self.xend * ystart = self.ystart * yend = self.yend # <<<<<<<<<<<<<< * * max_len = int(min(self.x.length, self.y.length) / 2) + 1 */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.yend); __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yend.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yend.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_2 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yend.rcbuffer->pybuffer, (PyObject*)__pyx_v_yend, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_4, __pyx_t_3); } __pyx_t_5 = __pyx_t_4 = __pyx_t_3 = 0; } __pyx_pybuffernd_yend.diminfo[0].strides = __pyx_pybuffernd_yend.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yend.diminfo[0].shape = __pyx_pybuffernd_yend.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 689, __pyx_L1_error) } __pyx_v_yend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":691 * yend = self.yend * * max_len = int(min(self.x.length, self.y.length) / 2) + 1 # <<<<<<<<<<<<<< * out_bloc = np.empty(max_len, dtype=np.int32) * out_blen = np.empty(max_len, dtype=np.int32) */ __pyx_t_6 = __pyx_v_self->__pyx_base.y->length; __pyx_t_7 = __pyx_v_self->__pyx_base.x->length; if (((__pyx_t_6 < __pyx_t_7) != 0)) { __pyx_t_8 = __pyx_t_6; } else { __pyx_t_8 = __pyx_t_7; } __pyx_t_1 = __Pyx_PyInt_From_long(__Pyx_div_long(__pyx_t_8, 2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_9, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_max_len = __pyx_t_10; /* "pandas/_libs/sparse.pyx":692 * * max_len = int(min(self.x.length, self.y.length) / 2) + 1 * out_bloc = np.empty(max_len, dtype=np.int32) # <<<<<<<<<<<<<< * out_blen = np.empty(max_len, dtype=np.int32) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int32); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_13) < 0) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 692, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_13); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_2 < 0)) { PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_bloc, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5); } __pyx_t_3 = __pyx_t_4 = __pyx_t_5 = 0; } __pyx_pybuffernd_out_bloc.diminfo[0].strides = __pyx_pybuffernd_out_bloc.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_bloc.diminfo[0].shape = __pyx_pybuffernd_out_bloc.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 692, __pyx_L1_error) } __pyx_t_14 = 0; __pyx_v_out_bloc = ((PyArrayObject *)__pyx_t_13); __pyx_t_13 = 0; /* "pandas/_libs/sparse.pyx":693 * max_len = int(min(self.x.length, self.y.length) / 2) + 1 * out_bloc = np.empty(max_len, dtype=np.int32) * out_blen = np.empty(max_len, dtype=np.int32) # <<<<<<<<<<<<<< * * while True: */ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_max_len); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int32); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_12) < 0) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 693, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_2 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_blen, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_4, __pyx_t_3); } __pyx_t_5 = __pyx_t_4 = __pyx_t_3 = 0; } __pyx_pybuffernd_out_blen.diminfo[0].strides = __pyx_pybuffernd_out_blen.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_blen.diminfo[0].shape = __pyx_pybuffernd_out_blen.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 693, __pyx_L1_error) } __pyx_t_14 = 0; __pyx_v_out_blen = ((PyArrayObject *)__pyx_t_12); __pyx_t_12 = 0; /* "pandas/_libs/sparse.pyx":695 * out_blen = np.empty(max_len, dtype=np.int32) * * while True: # <<<<<<<<<<<<<< * # we are done (or possibly never began) * if self.xi >= self.x.nblocks and self.yi >= self.y.nblocks: */ while (1) { /* "pandas/_libs/sparse.pyx":697 * while True: * # we are done (or possibly never began) * if self.xi >= self.x.nblocks and self.yi >= self.y.nblocks: # <<<<<<<<<<<<<< * break * elif self.yi >= self.y.nblocks: */ __pyx_t_16 = ((__pyx_v_self->__pyx_base.xi >= __pyx_v_self->__pyx_base.x->nblocks) != 0); if (__pyx_t_16) { } else { __pyx_t_15 = __pyx_t_16; goto __pyx_L6_bool_binop_done; } __pyx_t_16 = ((__pyx_v_self->__pyx_base.yi >= __pyx_v_self->__pyx_base.y->nblocks) != 0); __pyx_t_15 = __pyx_t_16; __pyx_L6_bool_binop_done:; if (__pyx_t_15) { /* "pandas/_libs/sparse.pyx":698 * # we are done (or possibly never began) * if self.xi >= self.x.nblocks and self.yi >= self.y.nblocks: * break # <<<<<<<<<<<<<< * elif self.yi >= self.y.nblocks: * # through with y, just pass through x blocks */ goto __pyx_L4_break; /* "pandas/_libs/sparse.pyx":697 * while True: * # we are done (or possibly never began) * if self.xi >= self.x.nblocks and self.yi >= self.y.nblocks: # <<<<<<<<<<<<<< * break * elif self.yi >= self.y.nblocks: */ } /* "pandas/_libs/sparse.pyx":699 * if self.xi >= self.x.nblocks and self.yi >= self.y.nblocks: * break * elif self.yi >= self.y.nblocks: # <<<<<<<<<<<<<< * # through with y, just pass through x blocks * nstart = xstart[self.xi] */ __pyx_t_15 = ((__pyx_v_self->__pyx_base.yi >= __pyx_v_self->__pyx_base.y->nblocks) != 0); if (__pyx_t_15) { /* "pandas/_libs/sparse.pyx":701 * elif self.yi >= self.y.nblocks: * # through with y, just pass through x blocks * nstart = xstart[self.xi] # <<<<<<<<<<<<<< * nend = xend[self.xi] * self.xi += 1 */ __pyx_t_17 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_xstart.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_xstart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); __PYX_ERR(0, 701, __pyx_L1_error) } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xstart.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xstart.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":702 * # through with y, just pass through x blocks * nstart = xstart[self.xi] * nend = xend[self.xi] # <<<<<<<<<<<<<< * self.xi += 1 * elif self.xi >= self.x.nblocks: */ __pyx_t_18 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_xend.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_xend.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); __PYX_ERR(0, 702, __pyx_L1_error) } __pyx_v_nend = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xend.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_xend.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":703 * nstart = xstart[self.xi] * nend = xend[self.xi] * self.xi += 1 # <<<<<<<<<<<<<< * elif self.xi >= self.x.nblocks: * # through with x, just pass through y blocks */ __pyx_v_self->__pyx_base.xi = (__pyx_v_self->__pyx_base.xi + 1); /* "pandas/_libs/sparse.pyx":699 * if self.xi >= self.x.nblocks and self.yi >= self.y.nblocks: * break * elif self.yi >= self.y.nblocks: # <<<<<<<<<<<<<< * # through with y, just pass through x blocks * nstart = xstart[self.xi] */ goto __pyx_L5; } /* "pandas/_libs/sparse.pyx":704 * nend = xend[self.xi] * self.xi += 1 * elif self.xi >= self.x.nblocks: # <<<<<<<<<<<<<< * # through with x, just pass through y blocks * nstart = ystart[self.yi] */ __pyx_t_15 = ((__pyx_v_self->__pyx_base.xi >= __pyx_v_self->__pyx_base.x->nblocks) != 0); if (__pyx_t_15) { /* "pandas/_libs/sparse.pyx":706 * elif self.xi >= self.x.nblocks: * # through with x, just pass through y blocks * nstart = ystart[self.yi] # <<<<<<<<<<<<<< * nend = yend[self.yi] * self.yi += 1 */ __pyx_t_19 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); __PYX_ERR(0, 706, __pyx_L1_error) } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_ystart.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":707 * # through with x, just pass through y blocks * nstart = ystart[self.yi] * nend = yend[self.yi] # <<<<<<<<<<<<<< * self.yi += 1 * else: */ __pyx_t_20 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_20 < 0) { __pyx_t_20 += __pyx_pybuffernd_yend.diminfo[0].shape; if (unlikely(__pyx_t_20 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_yend.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); __PYX_ERR(0, 707, __pyx_L1_error) } __pyx_v_nend = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yend.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_yend.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":708 * nstart = ystart[self.yi] * nend = yend[self.yi] * self.yi += 1 # <<<<<<<<<<<<<< * else: * # find end of new block */ __pyx_v_self->__pyx_base.yi = (__pyx_v_self->__pyx_base.yi + 1); /* "pandas/_libs/sparse.pyx":704 * nend = xend[self.xi] * self.xi += 1 * elif self.xi >= self.x.nblocks: # <<<<<<<<<<<<<< * # through with x, just pass through y blocks * nstart = ystart[self.yi] */ goto __pyx_L5; } /* "pandas/_libs/sparse.pyx":711 * else: * # find end of new block * if xstart[self.xi] < ystart[self.yi]: # <<<<<<<<<<<<<< * nstart = xstart[self.xi] * nend = self._find_next_block_end(0) */ /*else*/ { __pyx_t_21 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_21 < 0) { __pyx_t_21 += __pyx_pybuffernd_xstart.diminfo[0].shape; if (unlikely(__pyx_t_21 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_xstart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); __PYX_ERR(0, 711, __pyx_L1_error) } __pyx_t_22 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_22 < 0) { __pyx_t_22 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_22 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); __PYX_ERR(0, 711, __pyx_L1_error) } __pyx_t_15 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xstart.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_xstart.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_ystart.diminfo[0].strides))) != 0); if (__pyx_t_15) { /* "pandas/_libs/sparse.pyx":712 * # find end of new block * if xstart[self.xi] < ystart[self.yi]: * nstart = xstart[self.xi] # <<<<<<<<<<<<<< * nend = self._find_next_block_end(0) * else: */ __pyx_t_23 = __pyx_v_self->__pyx_base.xi; __pyx_t_2 = -1; if (__pyx_t_23 < 0) { __pyx_t_23 += __pyx_pybuffernd_xstart.diminfo[0].shape; if (unlikely(__pyx_t_23 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_xstart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); __PYX_ERR(0, 712, __pyx_L1_error) } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xstart.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_xstart.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":713 * if xstart[self.xi] < ystart[self.yi]: * nstart = xstart[self.xi] * nend = self._find_next_block_end(0) # <<<<<<<<<<<<<< * else: * nstart = ystart[self.yi] */ __pyx_t_8 = ((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->_find_next_block_end(__pyx_v_self, 0); if (unlikely(__pyx_t_8 == ((__pyx_t_5numpy_int32_t)-1))) __PYX_ERR(0, 713, __pyx_L1_error) __pyx_v_nend = __pyx_t_8; /* "pandas/_libs/sparse.pyx":711 * else: * # find end of new block * if xstart[self.xi] < ystart[self.yi]: # <<<<<<<<<<<<<< * nstart = xstart[self.xi] * nend = self._find_next_block_end(0) */ goto __pyx_L8; } /* "pandas/_libs/sparse.pyx":715 * nend = self._find_next_block_end(0) * else: * nstart = ystart[self.yi] # <<<<<<<<<<<<<< * nend = self._find_next_block_end(1) * */ /*else*/ { __pyx_t_24 = __pyx_v_self->__pyx_base.yi; __pyx_t_2 = -1; if (__pyx_t_24 < 0) { __pyx_t_24 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_24 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); __PYX_ERR(0, 715, __pyx_L1_error) } __pyx_v_nstart = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ystart.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":716 * else: * nstart = ystart[self.yi] * nend = self._find_next_block_end(1) # <<<<<<<<<<<<<< * * out_bloc[result_indexer] = nstart */ __pyx_t_8 = ((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->_find_next_block_end(__pyx_v_self, 1); if (unlikely(__pyx_t_8 == ((__pyx_t_5numpy_int32_t)-1))) __PYX_ERR(0, 716, __pyx_L1_error) __pyx_v_nend = __pyx_t_8; } __pyx_L8:; } __pyx_L5:; /* "pandas/_libs/sparse.pyx":718 * nend = self._find_next_block_end(1) * * out_bloc[result_indexer] = nstart # <<<<<<<<<<<<<< * out_blen[result_indexer] = nend - nstart * result_indexer += 1 */ __pyx_t_25 = __pyx_v_result_indexer; __pyx_t_2 = -1; if (__pyx_t_25 < 0) { __pyx_t_25 += __pyx_pybuffernd_out_bloc.diminfo[0].shape; if (unlikely(__pyx_t_25 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_out_bloc.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); __PYX_ERR(0, 718, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out_bloc.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out_bloc.diminfo[0].strides) = __pyx_v_nstart; /* "pandas/_libs/sparse.pyx":719 * * out_bloc[result_indexer] = nstart * out_blen[result_indexer] = nend - nstart # <<<<<<<<<<<<<< * result_indexer += 1 * */ __pyx_t_26 = __pyx_v_result_indexer; __pyx_t_2 = -1; if (__pyx_t_26 < 0) { __pyx_t_26 += __pyx_pybuffernd_out_blen.diminfo[0].shape; if (unlikely(__pyx_t_26 < 0)) __pyx_t_2 = 0; } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_out_blen.diminfo[0].shape)) __pyx_t_2 = 0; if (unlikely(__pyx_t_2 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_2); __PYX_ERR(0, 719, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_out_blen.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_out_blen.diminfo[0].strides) = (__pyx_v_nend - __pyx_v_nstart); /* "pandas/_libs/sparse.pyx":720 * out_bloc[result_indexer] = nstart * out_blen[result_indexer] = nend - nstart * result_indexer += 1 # <<<<<<<<<<<<<< * * out_bloc = out_bloc[:result_indexer] */ __pyx_v_result_indexer = (__pyx_v_result_indexer + 1); } __pyx_L4_break:; /* "pandas/_libs/sparse.pyx":722 * result_indexer += 1 * * out_bloc = out_bloc[:result_indexer] # <<<<<<<<<<<<<< * out_blen = out_blen[:result_indexer] * */ __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_result_indexer); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PySlice_New(Py_None, __pyx_t_12, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_out_bloc), __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 722, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_2 < 0)) { PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_bloc, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5); } __pyx_t_3 = __pyx_t_4 = __pyx_t_5 = 0; } __pyx_pybuffernd_out_bloc.diminfo[0].strides = __pyx_pybuffernd_out_bloc.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_bloc.diminfo[0].shape = __pyx_pybuffernd_out_bloc.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 722, __pyx_L1_error) } __pyx_t_14 = 0; __Pyx_DECREF_SET(__pyx_v_out_bloc, ((PyArrayObject *)__pyx_t_12)); __pyx_t_12 = 0; /* "pandas/_libs/sparse.pyx":723 * * out_bloc = out_bloc[:result_indexer] * out_blen = out_blen[:result_indexer] # <<<<<<<<<<<<<< * * return BlockIndex(self.x.length, out_bloc, out_blen) */ __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_result_indexer); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PySlice_New(Py_None, __pyx_t_12, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_out_blen), __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 723, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_12); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer); __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_2 < 0)) { PyErr_Fetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_blen, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_5, __pyx_t_4, __pyx_t_3); } __pyx_t_5 = __pyx_t_4 = __pyx_t_3 = 0; } __pyx_pybuffernd_out_blen.diminfo[0].strides = __pyx_pybuffernd_out_blen.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_blen.diminfo[0].shape = __pyx_pybuffernd_out_blen.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 723, __pyx_L1_error) } __pyx_t_14 = 0; __Pyx_DECREF_SET(__pyx_v_out_blen, ((PyArrayObject *)__pyx_t_12)); __pyx_t_12 = 0; /* "pandas/_libs/sparse.pyx":725 * out_blen = out_blen[:result_indexer] * * return BlockIndex(self.x.length, out_bloc, out_blen) # <<<<<<<<<<<<<< * * cdef int32_t _find_next_block_end(self, bint mode) except -1: */ __Pyx_XDECREF(__pyx_r); __pyx_t_12 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->__pyx_base.x->length); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __Pyx_INCREF(((PyObject *)__pyx_v_out_bloc)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_bloc)); PyTuple_SET_ITEM(__pyx_t_13, 1, ((PyObject *)__pyx_v_out_bloc)); __Pyx_INCREF(((PyObject *)__pyx_v_out_blen)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_blen)); PyTuple_SET_ITEM(__pyx_t_13, 2, ((PyObject *)__pyx_v_out_blen)); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_BlockIndex), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_r = __pyx_t_12; __pyx_t_12 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":679 * """ * * cdef _make_merged_blocks(self): # <<<<<<<<<<<<<< * cdef: * ndarray[int32_t, ndim=1] xstart, xend, ystart */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xend.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yend.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockUnion._make_merged_blocks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_blen.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_bloc.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xend.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yend.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_xstart); __Pyx_XDECREF((PyObject *)__pyx_v_xend); __Pyx_XDECREF((PyObject *)__pyx_v_ystart); __Pyx_XDECREF((PyObject *)__pyx_v_yend); __Pyx_XDECREF((PyObject *)__pyx_v_out_bloc); __Pyx_XDECREF((PyObject *)__pyx_v_out_blen); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":727 * return BlockIndex(self.x.length, out_bloc, out_blen) * * cdef int32_t _find_next_block_end(self, bint mode) except -1: # <<<<<<<<<<<<<< * """ * Wow, this got complicated in a hurry */ static __pyx_t_5numpy_int32_t __pyx_f_6pandas_5_libs_6sparse_10BlockUnion__find_next_block_end(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *__pyx_v_self, int __pyx_v_mode) { CYTHON_UNUSED PyArrayObject *__pyx_v_xstart = 0; PyArrayObject *__pyx_v_xend = 0; PyArrayObject *__pyx_v_ystart = 0; PyArrayObject *__pyx_v_yend = 0; __pyx_t_5numpy_int32_t __pyx_v_xi; __pyx_t_5numpy_int32_t __pyx_v_yi; __pyx_t_5numpy_int32_t __pyx_v_ynblocks; __pyx_t_5numpy_int32_t __pyx_v_nend; __Pyx_LocalBuf_ND __pyx_pybuffernd_xend; __Pyx_Buffer __pyx_pybuffer_xend; __Pyx_LocalBuf_ND __pyx_pybuffernd_xstart; __Pyx_Buffer __pyx_pybuffer_xstart; __Pyx_LocalBuf_ND __pyx_pybuffernd_yend; __Pyx_Buffer __pyx_pybuffer_yend; __Pyx_LocalBuf_ND __pyx_pybuffernd_ystart; __Pyx_Buffer __pyx_pybuffer_ystart; __pyx_t_5numpy_int32_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __pyx_t_5numpy_int32_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_t_10; Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; __Pyx_RefNannySetupContext("_find_next_block_end", 0); __pyx_pybuffer_xstart.pybuffer.buf = NULL; __pyx_pybuffer_xstart.refcount = 0; __pyx_pybuffernd_xstart.data = NULL; __pyx_pybuffernd_xstart.rcbuffer = &__pyx_pybuffer_xstart; __pyx_pybuffer_xend.pybuffer.buf = NULL; __pyx_pybuffer_xend.refcount = 0; __pyx_pybuffernd_xend.data = NULL; __pyx_pybuffernd_xend.rcbuffer = &__pyx_pybuffer_xend; __pyx_pybuffer_ystart.pybuffer.buf = NULL; __pyx_pybuffer_ystart.refcount = 0; __pyx_pybuffernd_ystart.data = NULL; __pyx_pybuffernd_ystart.rcbuffer = &__pyx_pybuffer_ystart; __pyx_pybuffer_yend.pybuffer.buf = NULL; __pyx_pybuffer_yend.refcount = 0; __pyx_pybuffernd_yend.data = NULL; __pyx_pybuffernd_yend.rcbuffer = &__pyx_pybuffer_yend; /* "pandas/_libs/sparse.pyx":738 * int32_t xi, yi, xnblocks, ynblocks, nend * * if mode != 0 and mode != 1: # <<<<<<<<<<<<<< * raise Exception('Mode must be 0 or 1') * */ switch (__pyx_v_mode) { case 0: case 1: __pyx_t_1 = 0; break; default: __pyx_t_1 = 1; break; } if (unlikely(__pyx_t_1)) { /* "pandas/_libs/sparse.pyx":739 * * if mode != 0 and mode != 1: * raise Exception('Mode must be 0 or 1') # <<<<<<<<<<<<<< * * # so symmetric code will work */ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 739, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":738 * int32_t xi, yi, xnblocks, ynblocks, nend * * if mode != 0 and mode != 1: # <<<<<<<<<<<<<< * raise Exception('Mode must be 0 or 1') * */ } /* "pandas/_libs/sparse.pyx":742 * * # so symmetric code will work * if mode == 0: # <<<<<<<<<<<<<< * xstart = self.xstart * xend = self.xend */ __pyx_t_1 = ((__pyx_v_mode == 0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse.pyx":743 * # so symmetric code will work * if mode == 0: * xstart = self.xstart # <<<<<<<<<<<<<< * xend = self.xend * xi = self.xi */ __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.xstart); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer, (PyObject*)__pyx_v_xstart, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6); } __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0; } __pyx_pybuffernd_xstart.diminfo[0].strides = __pyx_pybuffernd_xstart.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xstart.diminfo[0].shape = __pyx_pybuffernd_xstart.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 743, __pyx_L1_error) } __pyx_v_xstart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":744 * if mode == 0: * xstart = self.xstart * xend = self.xend # <<<<<<<<<<<<<< * xi = self.xi * */ __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.xend); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xend.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xend.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xend.rcbuffer->pybuffer, (PyObject*)__pyx_v_xend, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4); } __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0; } __pyx_pybuffernd_xend.diminfo[0].strides = __pyx_pybuffernd_xend.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xend.diminfo[0].shape = __pyx_pybuffernd_xend.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 744, __pyx_L1_error) } __pyx_v_xend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":745 * xstart = self.xstart * xend = self.xend * xi = self.xi # <<<<<<<<<<<<<< * * ystart = self.ystart */ __pyx_t_7 = __pyx_v_self->__pyx_base.xi; __pyx_v_xi = __pyx_t_7; /* "pandas/_libs/sparse.pyx":747 * xi = self.xi * * ystart = self.ystart # <<<<<<<<<<<<<< * yend = self.yend * yi = self.yi */ __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.ystart); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer, (PyObject*)__pyx_v_ystart, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6); } __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0; } __pyx_pybuffernd_ystart.diminfo[0].strides = __pyx_pybuffernd_ystart.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ystart.diminfo[0].shape = __pyx_pybuffernd_ystart.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 747, __pyx_L1_error) } __pyx_v_ystart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":748 * * ystart = self.ystart * yend = self.yend # <<<<<<<<<<<<<< * yi = self.yi * ynblocks = self.y.nblocks */ __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.yend); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yend.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yend.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yend.rcbuffer->pybuffer, (PyObject*)__pyx_v_yend, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4); } __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0; } __pyx_pybuffernd_yend.diminfo[0].strides = __pyx_pybuffernd_yend.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yend.diminfo[0].shape = __pyx_pybuffernd_yend.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 748, __pyx_L1_error) } __pyx_v_yend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":749 * ystart = self.ystart * yend = self.yend * yi = self.yi # <<<<<<<<<<<<<< * ynblocks = self.y.nblocks * else: */ __pyx_t_7 = __pyx_v_self->__pyx_base.yi; __pyx_v_yi = __pyx_t_7; /* "pandas/_libs/sparse.pyx":750 * yend = self.yend * yi = self.yi * ynblocks = self.y.nblocks # <<<<<<<<<<<<<< * else: * xstart = self.ystart */ __pyx_t_7 = __pyx_v_self->__pyx_base.y->nblocks; __pyx_v_ynblocks = __pyx_t_7; /* "pandas/_libs/sparse.pyx":742 * * # so symmetric code will work * if mode == 0: # <<<<<<<<<<<<<< * xstart = self.xstart * xend = self.xend */ goto __pyx_L4; } /* "pandas/_libs/sparse.pyx":752 * ynblocks = self.y.nblocks * else: * xstart = self.ystart # <<<<<<<<<<<<<< * xend = self.yend * xi = self.yi */ /*else*/ { __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.ystart); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer, (PyObject*)__pyx_v_xstart, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6); } __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0; } __pyx_pybuffernd_xstart.diminfo[0].strides = __pyx_pybuffernd_xstart.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xstart.diminfo[0].shape = __pyx_pybuffernd_xstart.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 752, __pyx_L1_error) } __pyx_v_xstart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":753 * else: * xstart = self.ystart * xend = self.yend # <<<<<<<<<<<<<< * xi = self.yi * */ __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.yend); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xend.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xend.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xend.rcbuffer->pybuffer, (PyObject*)__pyx_v_xend, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4); } __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0; } __pyx_pybuffernd_xend.diminfo[0].strides = __pyx_pybuffernd_xend.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xend.diminfo[0].shape = __pyx_pybuffernd_xend.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 753, __pyx_L1_error) } __pyx_v_xend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":754 * xstart = self.ystart * xend = self.yend * xi = self.yi # <<<<<<<<<<<<<< * * ystart = self.xstart */ __pyx_t_7 = __pyx_v_self->__pyx_base.yi; __pyx_v_xi = __pyx_t_7; /* "pandas/_libs/sparse.pyx":756 * xi = self.yi * * ystart = self.xstart # <<<<<<<<<<<<<< * yend = self.xend * yi = self.xi */ __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.xstart); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer, (PyObject*)__pyx_v_ystart, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6); } __pyx_t_4 = __pyx_t_5 = __pyx_t_6 = 0; } __pyx_pybuffernd_ystart.diminfo[0].strides = __pyx_pybuffernd_ystart.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ystart.diminfo[0].shape = __pyx_pybuffernd_ystart.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 756, __pyx_L1_error) } __pyx_v_ystart = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":757 * * ystart = self.xstart * yend = self.xend # <<<<<<<<<<<<<< * yi = self.xi * ynblocks = self.x.nblocks */ __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.xend); __Pyx_INCREF(__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yend.rcbuffer->pybuffer); __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yend.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_3 < 0)) { PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yend.rcbuffer->pybuffer, (PyObject*)__pyx_v_yend, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4); } __pyx_t_6 = __pyx_t_5 = __pyx_t_4 = 0; } __pyx_pybuffernd_yend.diminfo[0].strides = __pyx_pybuffernd_yend.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yend.diminfo[0].shape = __pyx_pybuffernd_yend.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 757, __pyx_L1_error) } __pyx_v_yend = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":758 * ystart = self.xstart * yend = self.xend * yi = self.xi # <<<<<<<<<<<<<< * ynblocks = self.x.nblocks * */ __pyx_t_7 = __pyx_v_self->__pyx_base.xi; __pyx_v_yi = __pyx_t_7; /* "pandas/_libs/sparse.pyx":759 * yend = self.xend * yi = self.xi * ynblocks = self.x.nblocks # <<<<<<<<<<<<<< * * nend = xend[xi] */ __pyx_t_7 = __pyx_v_self->__pyx_base.x->nblocks; __pyx_v_ynblocks = __pyx_t_7; } __pyx_L4:; /* "pandas/_libs/sparse.pyx":761 * ynblocks = self.x.nblocks * * nend = xend[xi] # <<<<<<<<<<<<<< * * # print 'here xi=%d, yi=%d, mode=%d, nend=%d' % (self.xi, self.yi, */ __pyx_t_8 = __pyx_v_xi; __pyx_t_3 = -1; if (__pyx_t_8 < 0) { __pyx_t_8 += __pyx_pybuffernd_xend.diminfo[0].shape; if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_xend.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); __PYX_ERR(0, 761, __pyx_L1_error) } __pyx_v_nend = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xend.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_xend.diminfo[0].strides)); /* "pandas/_libs/sparse.pyx":767 * * # done with y? * if yi == ynblocks: # <<<<<<<<<<<<<< * self._set_current_indices(xi + 1, yi, mode) * return nend */ __pyx_t_1 = ((__pyx_v_yi == __pyx_v_ynblocks) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse.pyx":768 * # done with y? * if yi == ynblocks: * self._set_current_indices(xi + 1, yi, mode) # <<<<<<<<<<<<<< * return nend * elif nend < ystart[yi]: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_current_indices(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)__pyx_v_self), (__pyx_v_xi + 1), __pyx_v_yi, __pyx_v_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":769 * if yi == ynblocks: * self._set_current_indices(xi + 1, yi, mode) * return nend # <<<<<<<<<<<<<< * elif nend < ystart[yi]: * # block ends before y block */ __pyx_r = __pyx_v_nend; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":767 * * # done with y? * if yi == ynblocks: # <<<<<<<<<<<<<< * self._set_current_indices(xi + 1, yi, mode) * return nend */ } /* "pandas/_libs/sparse.pyx":770 * self._set_current_indices(xi + 1, yi, mode) * return nend * elif nend < ystart[yi]: # <<<<<<<<<<<<<< * # block ends before y block * self._set_current_indices(xi + 1, yi, mode) */ __pyx_t_9 = __pyx_v_yi; __pyx_t_3 = -1; if (__pyx_t_9 < 0) { __pyx_t_9 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); __PYX_ERR(0, 770, __pyx_L1_error) } __pyx_t_1 = ((__pyx_v_nend < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_ystart.diminfo[0].strides))) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse.pyx":772 * elif nend < ystart[yi]: * # block ends before y block * self._set_current_indices(xi + 1, yi, mode) # <<<<<<<<<<<<<< * return nend * else: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_current_indices(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)__pyx_v_self), (__pyx_v_xi + 1), __pyx_v_yi, __pyx_v_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":773 * # block ends before y block * self._set_current_indices(xi + 1, yi, mode) * return nend # <<<<<<<<<<<<<< * else: * while yi < ynblocks and nend > yend[yi]: */ __pyx_r = __pyx_v_nend; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":770 * self._set_current_indices(xi + 1, yi, mode) * return nend * elif nend < ystart[yi]: # <<<<<<<<<<<<<< * # block ends before y block * self._set_current_indices(xi + 1, yi, mode) */ } /* "pandas/_libs/sparse.pyx":775 * return nend * else: * while yi < ynblocks and nend > yend[yi]: # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { while (1) { __pyx_t_10 = ((__pyx_v_yi < __pyx_v_ynblocks) != 0); if (__pyx_t_10) { } else { __pyx_t_1 = __pyx_t_10; goto __pyx_L8_bool_binop_done; } __pyx_t_11 = __pyx_v_yi; __pyx_t_3 = -1; if (__pyx_t_11 < 0) { __pyx_t_11 += __pyx_pybuffernd_yend.diminfo[0].shape; if (unlikely(__pyx_t_11 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_yend.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); __PYX_ERR(0, 775, __pyx_L1_error) } __pyx_t_10 = ((__pyx_v_nend > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yend.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_yend.diminfo[0].strides))) != 0); __pyx_t_1 = __pyx_t_10; __pyx_L8_bool_binop_done:; if (!__pyx_t_1) break; /* "pandas/_libs/sparse.pyx":776 * else: * while yi < ynblocks and nend > yend[yi]: * yi += 1 # <<<<<<<<<<<<<< * * self._set_current_indices(xi + 1, yi, mode) */ __pyx_v_yi = (__pyx_v_yi + 1); } /* "pandas/_libs/sparse.pyx":778 * yi += 1 * * self._set_current_indices(xi + 1, yi, mode) # <<<<<<<<<<<<<< * * if yi == ynblocks: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._set_current_indices(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)__pyx_v_self), (__pyx_v_xi + 1), __pyx_v_yi, __pyx_v_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pandas/_libs/sparse.pyx":780 * self._set_current_indices(xi + 1, yi, mode) * * if yi == ynblocks: # <<<<<<<<<<<<<< * return nend * */ __pyx_t_1 = ((__pyx_v_yi == __pyx_v_ynblocks) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse.pyx":781 * * if yi == ynblocks: * return nend # <<<<<<<<<<<<<< * * if nend < ystart[yi]: */ __pyx_r = __pyx_v_nend; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":780 * self._set_current_indices(xi + 1, yi, mode) * * if yi == ynblocks: # <<<<<<<<<<<<<< * return nend * */ } /* "pandas/_libs/sparse.pyx":783 * return nend * * if nend < ystart[yi]: # <<<<<<<<<<<<<< * # we're done, return the block end * return nend */ __pyx_t_12 = __pyx_v_yi; __pyx_t_3 = -1; if (__pyx_t_12 < 0) { __pyx_t_12 += __pyx_pybuffernd_ystart.diminfo[0].shape; if (unlikely(__pyx_t_12 < 0)) __pyx_t_3 = 0; } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_ystart.diminfo[0].shape)) __pyx_t_3 = 0; if (unlikely(__pyx_t_3 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_3); __PYX_ERR(0, 783, __pyx_L1_error) } __pyx_t_1 = ((__pyx_v_nend < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_ystart.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_ystart.diminfo[0].strides))) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse.pyx":785 * if nend < ystart[yi]: * # we're done, return the block end * return nend # <<<<<<<<<<<<<< * else: * # merge blocks, continue searching */ __pyx_r = __pyx_v_nend; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":783 * return nend * * if nend < ystart[yi]: # <<<<<<<<<<<<<< * # we're done, return the block end * return nend */ } /* "pandas/_libs/sparse.pyx":789 * # merge blocks, continue searching * # this also catches the case where blocks * return self._find_next_block_end(1 - mode) # <<<<<<<<<<<<<< * * */ /*else*/ { __pyx_t_7 = ((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockUnion *)__pyx_v_self->__pyx_base.__pyx_vtab)->_find_next_block_end(__pyx_v_self, (1 - __pyx_v_mode)); if (unlikely(__pyx_t_7 == ((__pyx_t_5numpy_int32_t)-1))) __PYX_ERR(0, 789, __pyx_L1_error) __pyx_r = __pyx_t_7; goto __pyx_L0; } } /* "pandas/_libs/sparse.pyx":727 * return BlockIndex(self.x.length, out_bloc, out_blen) * * cdef int32_t _find_next_block_end(self, bint mode) except -1: # <<<<<<<<<<<<<< * """ * Wow, this got complicated in a hurry */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xend.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yend.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.BlockUnion._find_next_block_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xend.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xstart.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yend.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ystart.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_xstart); __Pyx_XDECREF((PyObject *)__pyx_v_xend); __Pyx_XDECREF((PyObject *)__pyx_v_ystart); __Pyx_XDECREF((PyObject *)__pyx_v_yend); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockUnion_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockUnion_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockUnion___reduce_cython__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockUnion___reduce_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *__pyx_v_self) { int __pyx_v_use_setstate; PyObject *__pyx_v_state = NULL; PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":3 * def __reduce_cython__(self): * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __pyx_t_1 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->__pyx_base.xi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_npy_int32(__pyx_v_self->__pyx_base.yi); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(11); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.result)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.result)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->__pyx_base.result)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.x)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.x)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base.x)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.xend)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.xend)); PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_self->__pyx_base.xend)); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.xlen)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.xlen)); PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->__pyx_base.xlen)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.xstart)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.xstart)); PyTuple_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_v_self->__pyx_base.xstart)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.y)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.y)); PyTuple_SET_ITEM(__pyx_t_3, 6, ((PyObject *)__pyx_v_self->__pyx_base.y)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.yend)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.yend)); PyTuple_SET_ITEM(__pyx_t_3, 7, ((PyObject *)__pyx_v_self->__pyx_base.yend)); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.ylen)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.ylen)); PyTuple_SET_ITEM(__pyx_t_3, 9, ((PyObject *)__pyx_v_self->__pyx_base.ylen)); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.ystart)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.ystart)); PyTuple_SET_ITEM(__pyx_t_3, 10, ((PyObject *)__pyx_v_self->__pyx_base.ystart)); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_v_state = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":4 * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v__dict = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":5 * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_4 = (__pyx_v__dict != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "(tree fragment)":6 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict); __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "(tree fragment)":7 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None */ __pyx_v_use_setstate = 1; /* "(tree fragment)":5 * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":9 * use_setstate = True * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_BlockUnion, (type(self), 0x0ce6794, None), state */ /*else*/ { __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.result) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.x) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.xend) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.xlen) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.xstart) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.y) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.yend) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __pyx_t_6 = (((PyObject *)__pyx_v_self->__pyx_base.ylen) != Py_None); __pyx_t_4 = (__pyx_t_6 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.ystart) != Py_None); __pyx_t_6 = (__pyx_t_4 != 0); __pyx_t_5 = __pyx_t_6; __pyx_L4_bool_binop_done:; __pyx_v_use_setstate = __pyx_t_5; } __pyx_L3:; /* "(tree fragment)":10 * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_BlockUnion, (type(self), 0x0ce6794, None), state * else: */ __pyx_t_5 = (__pyx_v_use_setstate != 0); if (__pyx_t_5) { /* "(tree fragment)":11 * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None * if use_setstate: * return __pyx_unpickle_BlockUnion, (type(self), 0x0ce6794, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_BlockUnion, (type(self), 0x0ce6794, state) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BlockUnion); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_13526932); __Pyx_GIVEREF(__pyx_int_13526932); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_13526932); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "(tree fragment)":10 * else: * use_setstate = self.result is not None or self.x is not None or self.xend is not None or self.xlen is not None or self.xstart is not None or self.y is not None or self.yend is not None or self.ylen is not None or self.ystart is not None * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_BlockUnion, (type(self), 0x0ce6794, None), state * else: */ } /* "(tree fragment)":13 * return __pyx_unpickle_BlockUnion, (type(self), 0x0ce6794, None), state * else: * return __pyx_unpickle_BlockUnion, (type(self), 0x0ce6794, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_BlockUnion__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BlockUnion); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_INCREF(__pyx_int_13526932); __Pyx_GIVEREF(__pyx_int_13526932); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_13526932); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef bint use_setstate * state = (self.result, self.x, self.xend, self.xi, self.xlen, self.xstart, self.y, self.yend, self.yi, self.ylen, self.ystart) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pandas._libs.sparse.BlockUnion.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":14 * else: * return __pyx_unpickle_BlockUnion, (type(self), 0x0ce6794, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_BlockUnion__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockUnion_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_10BlockUnion_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10BlockUnion_2__setstate_cython__(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10BlockUnion_2__setstate_cython__(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":15 * return __pyx_unpickle_BlockUnion, (type(self), 0x0ce6794, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_BlockUnion__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 15, __pyx_L1_error) __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockUnion__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":14 * else: * return __pyx_unpickle_BlockUnion, (type(self), 0x0ce6794, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_BlockUnion__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.BlockUnion.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":11 * #---------------------------------------------------------------------- * * cdef inline float64_t __div_float64(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * if a > 0: */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___div_float64(__pyx_t_5numpy_float64_t __pyx_v_a, __pyx_t_5numpy_float64_t __pyx_v_b) { __pyx_t_5numpy_float64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__div_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":12 * * cdef inline float64_t __div_float64(float64_t a, float64_t b): * if b == 0: # <<<<<<<<<<<<<< * if a > 0: * return INF */ __pyx_t_1 = ((__pyx_v_b == 0.0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":13 * cdef inline float64_t __div_float64(float64_t a, float64_t b): * if b == 0: * if a > 0: # <<<<<<<<<<<<<< * return INF * elif a < 0: */ __pyx_t_1 = ((__pyx_v_a > 0.0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":14 * if b == 0: * if a > 0: * return INF # <<<<<<<<<<<<<< * elif a < 0: * return -INF */ __pyx_r = __pyx_v_6pandas_5_libs_6sparse_INF; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":13 * cdef inline float64_t __div_float64(float64_t a, float64_t b): * if b == 0: * if a > 0: # <<<<<<<<<<<<<< * return INF * elif a < 0: */ } /* "pandas/_libs/sparse_op_helper.pxi":15 * if a > 0: * return INF * elif a < 0: # <<<<<<<<<<<<<< * return -INF * else: */ __pyx_t_1 = ((__pyx_v_a < 0.0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":16 * return INF * elif a < 0: * return -INF # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_r = (-__pyx_v_6pandas_5_libs_6sparse_INF); goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":15 * if a > 0: * return INF * elif a < 0: # <<<<<<<<<<<<<< * return -INF * else: */ } /* "pandas/_libs/sparse_op_helper.pxi":18 * return -INF * else: * return NaN # <<<<<<<<<<<<<< * else: * return float(a) / b */ /*else*/ { __pyx_r = __pyx_v_6pandas_5_libs_6sparse_NaN; goto __pyx_L0; } /* "pandas/_libs/sparse_op_helper.pxi":12 * * cdef inline float64_t __div_float64(float64_t a, float64_t b): * if b == 0: # <<<<<<<<<<<<<< * if a > 0: * return INF */ } /* "pandas/_libs/sparse_op_helper.pxi":20 * return NaN * else: * return float(a) / b # <<<<<<<<<<<<<< * * cdef inline float64_t __truediv_float64(float64_t a, float64_t b): */ /*else*/ { if (unlikely(__pyx_v_b == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(2, 20, __pyx_L1_error) } __pyx_r = (((double)__pyx_v_a) / __pyx_v_b); goto __pyx_L0; } /* "pandas/_libs/sparse_op_helper.pxi":11 * #---------------------------------------------------------------------- * * cdef inline float64_t __div_float64(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * if a > 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._libs.sparse.__div_float64", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":22 * return float(a) / b * * cdef inline float64_t __truediv_float64(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __div_float64(a, b) * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___truediv_float64(__pyx_t_5numpy_float64_t __pyx_v_a, __pyx_t_5numpy_float64_t __pyx_v_b) { __pyx_t_5numpy_float64_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__truediv_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":23 * * cdef inline float64_t __truediv_float64(float64_t a, float64_t b): * return __div_float64(a, b) # <<<<<<<<<<<<<< * * cdef inline float64_t __floordiv_float64(float64_t a, float64_t b): */ __pyx_r = __pyx_f_6pandas_5_libs_6sparse___div_float64(__pyx_v_a, __pyx_v_b); goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":22 * return float(a) / b * * cdef inline float64_t __truediv_float64(float64_t a, float64_t b): # <<<<<<<<<<<<<< * return __div_float64(a, b) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":25 * return __div_float64(a, b) * * cdef inline float64_t __floordiv_float64(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * # numpy >= 1.11 returns NaN */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___floordiv_float64(__pyx_t_5numpy_float64_t __pyx_v_a, __pyx_t_5numpy_float64_t __pyx_v_b) { __pyx_t_5numpy_float64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__floordiv_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":26 * * cdef inline float64_t __floordiv_float64(float64_t a, float64_t b): * if b == 0: # <<<<<<<<<<<<<< * # numpy >= 1.11 returns NaN * # for a // 0, rather than +-inf */ __pyx_t_1 = ((__pyx_v_b == 0.0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":29 * # numpy >= 1.11 returns NaN * # for a // 0, rather than +-inf * if _np_version_under1p11: # <<<<<<<<<<<<<< * if a > 0: * return INF */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np_version_under1p11); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":30 * # for a // 0, rather than +-inf * if _np_version_under1p11: * if a > 0: # <<<<<<<<<<<<<< * return INF * elif a < 0: */ __pyx_t_1 = ((__pyx_v_a > 0.0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":31 * if _np_version_under1p11: * if a > 0: * return INF # <<<<<<<<<<<<<< * elif a < 0: * return -INF */ __pyx_r = __pyx_v_6pandas_5_libs_6sparse_INF; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":30 * # for a // 0, rather than +-inf * if _np_version_under1p11: * if a > 0: # <<<<<<<<<<<<<< * return INF * elif a < 0: */ } /* "pandas/_libs/sparse_op_helper.pxi":32 * if a > 0: * return INF * elif a < 0: # <<<<<<<<<<<<<< * return -INF * return NaN */ __pyx_t_1 = ((__pyx_v_a < 0.0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":33 * return INF * elif a < 0: * return -INF # <<<<<<<<<<<<<< * return NaN * else: */ __pyx_r = (-__pyx_v_6pandas_5_libs_6sparse_INF); goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":32 * if a > 0: * return INF * elif a < 0: # <<<<<<<<<<<<<< * return -INF * return NaN */ } /* "pandas/_libs/sparse_op_helper.pxi":29 * # numpy >= 1.11 returns NaN * # for a // 0, rather than +-inf * if _np_version_under1p11: # <<<<<<<<<<<<<< * if a > 0: * return INF */ } /* "pandas/_libs/sparse_op_helper.pxi":34 * elif a < 0: * return -INF * return NaN # <<<<<<<<<<<<<< * else: * return a // b */ __pyx_r = __pyx_v_6pandas_5_libs_6sparse_NaN; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":26 * * cdef inline float64_t __floordiv_float64(float64_t a, float64_t b): * if b == 0: # <<<<<<<<<<<<<< * # numpy >= 1.11 returns NaN * # for a // 0, rather than +-inf */ } /* "pandas/_libs/sparse_op_helper.pxi":36 * return NaN * else: * return a // b # <<<<<<<<<<<<<< * * cdef inline float64_t __mod_float64(float64_t a, float64_t b): */ /*else*/ { if (unlikely(__pyx_v_b == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(2, 36, __pyx_L1_error) } __pyx_r = floor(__pyx_v_a / __pyx_v_b); goto __pyx_L0; } /* "pandas/_libs/sparse_op_helper.pxi":25 * return __div_float64(a, b) * * cdef inline float64_t __floordiv_float64(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * # numpy >= 1.11 returns NaN */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("pandas._libs.sparse.__floordiv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":38 * return a // b * * cdef inline float64_t __mod_float64(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * return NaN */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___mod_float64(__pyx_t_5numpy_float64_t __pyx_v_a, __pyx_t_5numpy_float64_t __pyx_v_b) { __pyx_t_5numpy_float64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__mod_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":39 * * cdef inline float64_t __mod_float64(float64_t a, float64_t b): * if b == 0: # <<<<<<<<<<<<<< * return NaN * else: */ __pyx_t_1 = ((__pyx_v_b == 0.0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":40 * cdef inline float64_t __mod_float64(float64_t a, float64_t b): * if b == 0: * return NaN # <<<<<<<<<<<<<< * else: * return a % b */ __pyx_r = __pyx_v_6pandas_5_libs_6sparse_NaN; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":39 * * cdef inline float64_t __mod_float64(float64_t a, float64_t b): * if b == 0: # <<<<<<<<<<<<<< * return NaN * else: */ } /* "pandas/_libs/sparse_op_helper.pxi":42 * return NaN * else: * return a % b # <<<<<<<<<<<<<< * * cdef inline float64_t __div_int64(int64_t a, int64_t b): */ /*else*/ { if (unlikely(__pyx_v_b == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float divmod()"); __PYX_ERR(2, 42, __pyx_L1_error) } __pyx_r = __Pyx_mod___pyx_t_5numpy_float64_t(__pyx_v_a, __pyx_v_b); goto __pyx_L0; } /* "pandas/_libs/sparse_op_helper.pxi":38 * return a // b * * cdef inline float64_t __mod_float64(float64_t a, float64_t b): # <<<<<<<<<<<<<< * if b == 0: * return NaN */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._libs.sparse.__mod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":44 * return a % b * * cdef inline float64_t __div_int64(int64_t a, int64_t b): # <<<<<<<<<<<<<< * if b == 0: * if a > 0: */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___div_int64(__pyx_t_5numpy_int64_t __pyx_v_a, __pyx_t_5numpy_int64_t __pyx_v_b) { __pyx_t_5numpy_float64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__div_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":45 * * cdef inline float64_t __div_int64(int64_t a, int64_t b): * if b == 0: # <<<<<<<<<<<<<< * if a > 0: * return INF */ __pyx_t_1 = ((__pyx_v_b == 0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":46 * cdef inline float64_t __div_int64(int64_t a, int64_t b): * if b == 0: * if a > 0: # <<<<<<<<<<<<<< * return INF * elif a < 0: */ __pyx_t_1 = ((__pyx_v_a > 0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":47 * if b == 0: * if a > 0: * return INF # <<<<<<<<<<<<<< * elif a < 0: * return -INF */ __pyx_r = __pyx_v_6pandas_5_libs_6sparse_INF; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":46 * cdef inline float64_t __div_int64(int64_t a, int64_t b): * if b == 0: * if a > 0: # <<<<<<<<<<<<<< * return INF * elif a < 0: */ } /* "pandas/_libs/sparse_op_helper.pxi":48 * if a > 0: * return INF * elif a < 0: # <<<<<<<<<<<<<< * return -INF * else: */ __pyx_t_1 = ((__pyx_v_a < 0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":49 * return INF * elif a < 0: * return -INF # <<<<<<<<<<<<<< * else: * return NaN */ __pyx_r = (-__pyx_v_6pandas_5_libs_6sparse_INF); goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":48 * if a > 0: * return INF * elif a < 0: # <<<<<<<<<<<<<< * return -INF * else: */ } /* "pandas/_libs/sparse_op_helper.pxi":51 * return -INF * else: * return NaN # <<<<<<<<<<<<<< * else: * return float(a) / b */ /*else*/ { __pyx_r = __pyx_v_6pandas_5_libs_6sparse_NaN; goto __pyx_L0; } /* "pandas/_libs/sparse_op_helper.pxi":45 * * cdef inline float64_t __div_int64(int64_t a, int64_t b): * if b == 0: # <<<<<<<<<<<<<< * if a > 0: * return INF */ } /* "pandas/_libs/sparse_op_helper.pxi":53 * return NaN * else: * return float(a) / b # <<<<<<<<<<<<<< * * cdef inline float64_t __truediv_int64(int64_t a, int64_t b): */ /*else*/ { if (unlikely(__pyx_v_b == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); __PYX_ERR(2, 53, __pyx_L1_error) } __pyx_r = (((double)__pyx_v_a) / __pyx_v_b); goto __pyx_L0; } /* "pandas/_libs/sparse_op_helper.pxi":44 * return a % b * * cdef inline float64_t __div_int64(int64_t a, int64_t b): # <<<<<<<<<<<<<< * if b == 0: * if a > 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._libs.sparse.__div_int64", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":55 * return float(a) / b * * cdef inline float64_t __truediv_int64(int64_t a, int64_t b): # <<<<<<<<<<<<<< * return __div_int64(a, b) * */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_6pandas_5_libs_6sparse___truediv_int64(__pyx_t_5numpy_int64_t __pyx_v_a, __pyx_t_5numpy_int64_t __pyx_v_b) { __pyx_t_5numpy_float64_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__truediv_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":56 * * cdef inline float64_t __truediv_int64(int64_t a, int64_t b): * return __div_int64(a, b) # <<<<<<<<<<<<<< * * cdef inline int64_t __floordiv_int64(int64_t a, int64_t b): */ __pyx_r = __pyx_f_6pandas_5_libs_6sparse___div_int64(__pyx_v_a, __pyx_v_b); goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":55 * return float(a) / b * * cdef inline float64_t __truediv_int64(int64_t a, int64_t b): # <<<<<<<<<<<<<< * return __div_int64(a, b) * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":58 * return __div_int64(a, b) * * cdef inline int64_t __floordiv_int64(int64_t a, int64_t b): # <<<<<<<<<<<<<< * if b == 0: * return 0 */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5_libs_6sparse___floordiv_int64(__pyx_t_5numpy_int64_t __pyx_v_a, __pyx_t_5numpy_int64_t __pyx_v_b) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__floordiv_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":59 * * cdef inline int64_t __floordiv_int64(int64_t a, int64_t b): * if b == 0: # <<<<<<<<<<<<<< * return 0 * else: */ __pyx_t_1 = ((__pyx_v_b == 0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":60 * cdef inline int64_t __floordiv_int64(int64_t a, int64_t b): * if b == 0: * return 0 # <<<<<<<<<<<<<< * else: * return a // b */ __pyx_r = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":59 * * cdef inline int64_t __floordiv_int64(int64_t a, int64_t b): * if b == 0: # <<<<<<<<<<<<<< * return 0 * else: */ } /* "pandas/_libs/sparse_op_helper.pxi":62 * return 0 * else: * return a // b # <<<<<<<<<<<<<< * * cdef inline int64_t __mod_int64(int64_t a, int64_t b): */ /*else*/ { if (unlikely(__pyx_v_b == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); __PYX_ERR(2, 62, __pyx_L1_error) } else if (sizeof(__pyx_t_5numpy_int64_t) == sizeof(long) && (!(((__pyx_t_5numpy_int64_t)-1) > 0)) && unlikely(__pyx_v_b == (__pyx_t_5numpy_int64_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_a))) { PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); __PYX_ERR(2, 62, __pyx_L1_error) } __pyx_r = __Pyx_div___pyx_t_5numpy_int64_t(__pyx_v_a, __pyx_v_b); goto __pyx_L0; } /* "pandas/_libs/sparse_op_helper.pxi":58 * return __div_int64(a, b) * * cdef inline int64_t __floordiv_int64(int64_t a, int64_t b): # <<<<<<<<<<<<<< * if b == 0: * return 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._libs.sparse.__floordiv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":64 * return a // b * * cdef inline int64_t __mod_int64(int64_t a, int64_t b): # <<<<<<<<<<<<<< * if b == 0: * return 0 */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_5_libs_6sparse___mod_int64(__pyx_t_5numpy_int64_t __pyx_v_a, __pyx_t_5numpy_int64_t __pyx_v_b) { __pyx_t_5numpy_int64_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__mod_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":65 * * cdef inline int64_t __mod_int64(int64_t a, int64_t b): * if b == 0: # <<<<<<<<<<<<<< * return 0 * else: */ __pyx_t_1 = ((__pyx_v_b == 0) != 0); if (__pyx_t_1) { /* "pandas/_libs/sparse_op_helper.pxi":66 * cdef inline int64_t __mod_int64(int64_t a, int64_t b): * if b == 0: * return 0 # <<<<<<<<<<<<<< * else: * return a % b */ __pyx_r = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":65 * * cdef inline int64_t __mod_int64(int64_t a, int64_t b): * if b == 0: # <<<<<<<<<<<<<< * return 0 * else: */ } /* "pandas/_libs/sparse_op_helper.pxi":68 * return 0 * else: * return a % b # <<<<<<<<<<<<<< * * #---------------------------------------------------------------------- */ /*else*/ { if (unlikely(__pyx_v_b == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); __PYX_ERR(2, 68, __pyx_L1_error) } __pyx_r = __Pyx_mod___pyx_t_5numpy_int64_t(__pyx_v_a, __pyx_v_b); goto __pyx_L0; } /* "pandas/_libs/sparse_op_helper.pxi":64 * return a // b * * cdef inline int64_t __mod_int64(int64_t a, int64_t b): # <<<<<<<<<<<<<< * if b == 0: * return 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("pandas._libs.sparse.__mod_int64", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":77 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_add_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_add_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_add_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":89 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":90 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":92 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":98 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 98, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":99 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 99, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":101 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":102 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 102, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 102, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":107 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":108 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":110 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] + yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) + __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":111 * # use y fill value * out[out_i] = x[xi] + yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":114 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":115 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":116 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":117 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":115 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":118 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":108 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":120 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill + y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":122 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill + y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":123 * # use x fill value * out[out_i] = xfill + y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":126 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":127 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":128 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":129 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":127 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":130 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":120 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill + y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":132 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":133 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":136 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] + y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":137 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] + y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":138 * if xloc == yloc: * out[out_i] = x[xi] + y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":139 * out[out_i] = x[xi] + y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":142 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":143 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":144 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":145 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":143 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":147 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":148 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":149 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":150 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":148 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":136 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] + y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":152 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":154 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] + yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) + __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":155 * # use y fill value * out[out_i] = x[xi] + yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":158 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":159 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":160 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":161 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":159 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":152 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":164 * else: * # use x fill value * out[out_i] = xfill + y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":165 * # use x fill value * out[out_i] = xfill + y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":168 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":169 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":170 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":171 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill + yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":169 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":173 * ybp = 0 * * return out, out_index, xfill + yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble((__pyx_v_xfill + __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":77 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_add_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":178 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_add_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_add_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_add_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":184 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":191 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 191, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":192 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 192, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":195 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":196 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 196, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 196, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":198 * out = np.empty(out_index.npoints, dtype=np.float64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 198, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":199 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 199, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":200 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 200, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":203 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":204 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill + y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":206 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill + y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":207 * # use x fill value * out[out_i] = xfill + y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":208 * out[out_i] = xfill + y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":204 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill + y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":210 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":212 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] + yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) + __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":213 * # use y fill value * out[out_i] = x[xi] + yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":214 * out[out_i] = x[xi] + yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":210 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":216 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":217 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":220 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] + y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":221 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] + y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":222 * if xloc == yloc: * out[out_i] = x[xi] + y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":223 * out[out_i] = x[xi] + y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":220 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] + y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":224 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":226 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] + yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) + __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":227 * # use y fill value * out[out_i] = x[xi] + yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":224 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":230 * else: * # use x fill value * out[out_i] = xfill + y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":231 * # use x fill value * out[out_i] = xfill + y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill + yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":233 * yi += 1 * * return out, out_index, xfill + yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble((__pyx_v_xfill + __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":178 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_add_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":236 * * * cpdef sparse_add_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_3sparse_add_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_add_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_add_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 236, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 236, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":241 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_add_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":242 * * if isinstance(xindex, BlockIndex): * return block_op_add_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 242, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 242, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":243 * if isinstance(xindex, BlockIndex): * return block_op_add_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_add_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 243, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 243, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":242 * * if isinstance(xindex, BlockIndex): * return block_op_add_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_add_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":241 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_add_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":244 * return block_op_add_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_add_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":245 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_add_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 245, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 245, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":246 * elif isinstance(xindex, IntIndex): * return int_op_add_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 246, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 246, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":245 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_add_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_add_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":244 * return block_op_add_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_add_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":248 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 248, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":236 * * * cpdef sparse_add_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_3sparse_add_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_3sparse_add_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_add_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add_float64", 1, 6, 6, 1); __PYX_ERR(2, 236, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add_float64", 1, 6, 6, 2); __PYX_ERR(2, 236, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add_float64", 1, 6, 6, 3); __PYX_ERR(2, 236, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add_float64", 1, 6, 6, 4); __PYX_ERR(2, 236, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add_float64", 1, 6, 6, 5); __PYX_ERR(2, 236, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_add_float64") < 0)) __PYX_ERR(2, 236, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 237, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 239, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_add_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 236, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 236, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 237, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 238, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 239, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_2sparse_add_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_2sparse_add_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_add_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 236, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 236, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_add_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":251 * * * cpdef sparse_fill_add_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill + yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_5sparse_fill_add_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_add_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_add_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":253 * cpdef sparse_fill_add_float64(float64_t xfill, * float64_t yfill): * return xfill + yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble((__pyx_v_xfill + __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":251 * * * cpdef sparse_fill_add_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill + yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_5sparse_fill_add_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_5sparse_fill_add_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_add_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_add_float64", 1, 2, 2, 1); __PYX_ERR(2, 251, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_add_float64") < 0)) __PYX_ERR(2, 251, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 251, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 252, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_add_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 251, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_4sparse_fill_add_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_4sparse_fill_add_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_add_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_add_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_add_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":258 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_add_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_add_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_add_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":270 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":271 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":273 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":279 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 279, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":280 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 280, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":282 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":283 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 283, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 283, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":288 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":289 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":291 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] + yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) + __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":292 * # use y fill value * out[out_i] = x[xi] + yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":295 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":296 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":297 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":298 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":296 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":299 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":289 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":301 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill + y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":303 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill + y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":304 * # use x fill value * out[out_i] = xfill + y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":307 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":308 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":309 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":310 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":308 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":311 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":301 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill + y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":313 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":314 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":317 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] + y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":318 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] + y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":319 * if xloc == yloc: * out[out_i] = x[xi] + y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":320 * out[out_i] = x[xi] + y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":323 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":324 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":325 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":326 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":324 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":328 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":329 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":330 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":331 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":329 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":317 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] + y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":333 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":335 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] + yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) + __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":336 * # use y fill value * out[out_i] = x[xi] + yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":339 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":340 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":341 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":342 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":340 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":333 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":345 * else: * # use x fill value * out[out_i] = xfill + y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":346 * # use x fill value * out[out_i] = xfill + y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":349 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":350 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":351 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":352 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill + yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":350 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":354 * ybp = 0 * * return out, out_index, xfill + yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill + __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":258 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_add_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_add_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":359 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_add_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_add_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_add_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":365 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":372 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 372, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":373 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 373, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":376 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":377 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 377, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 377, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 377, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":379 * out = np.empty(out_index.npoints, dtype=np.int64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 379, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":380 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 380, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":381 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 381, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":384 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":385 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill + y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":387 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill + y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":388 * # use x fill value * out[out_i] = xfill + y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":389 * out[out_i] = xfill + y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":385 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill + y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":391 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":393 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] + yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) + __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":394 * # use y fill value * out[out_i] = x[xi] + yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":395 * out[out_i] = x[xi] + yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":391 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":397 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":398 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":401 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] + y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":402 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] + y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":403 * if xloc == yloc: * out[out_i] = x[xi] + y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":404 * out[out_i] = x[xi] + y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":401 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] + y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":405 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":407 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] + yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) + __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":408 * # use y fill value * out[out_i] = x[xi] + yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":405 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] + yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":411 * else: * # use x fill value * out[out_i] = xfill + y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":412 * # use x fill value * out[out_i] = xfill + y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill + yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":414 * yi += 1 * * return out, out_index, xfill + yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill + __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":359 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_add_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_add_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":417 * * * cpdef sparse_add_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_7sparse_add_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_add_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_add_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 417, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 417, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":422 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_add_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":423 * * if isinstance(xindex, BlockIndex): * return block_op_add_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 423, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 423, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":424 * if isinstance(xindex, BlockIndex): * return block_op_add_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_add_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 424, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 424, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":423 * * if isinstance(xindex, BlockIndex): * return block_op_add_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_add_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":422 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_add_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":425 * return block_op_add_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_add_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":426 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_add_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 426, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 426, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 426, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":427 * elif isinstance(xindex, IntIndex): * return int_op_add_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 427, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 427, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":426 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_add_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_add_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":425 * return block_op_add_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_add_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":429 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 429, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":417 * * * cpdef sparse_add_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_add_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_7sparse_add_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_7sparse_add_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_add_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add_int64", 1, 6, 6, 1); __PYX_ERR(2, 417, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add_int64", 1, 6, 6, 2); __PYX_ERR(2, 417, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add_int64", 1, 6, 6, 3); __PYX_ERR(2, 417, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add_int64", 1, 6, 6, 4); __PYX_ERR(2, 417, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_add_int64", 1, 6, 6, 5); __PYX_ERR(2, 417, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_add_int64") < 0)) __PYX_ERR(2, 417, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 418, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 420, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_add_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 417, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_add_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 417, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 418, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 419, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 420, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_6sparse_add_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_6sparse_add_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_add_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 417, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 417, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_add_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_add_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":432 * * * cpdef sparse_fill_add_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill + yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_9sparse_fill_add_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_add_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_add_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":434 * cpdef sparse_fill_add_int64(int64_t xfill, * int64_t yfill): * return xfill + yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill + __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":432 * * * cpdef sparse_fill_add_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill + yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_add_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_9sparse_fill_add_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_9sparse_fill_add_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_add_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_add_int64", 1, 2, 2, 1); __PYX_ERR(2, 432, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_add_int64") < 0)) __PYX_ERR(2, 432, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 432, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 433, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_add_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 432, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_add_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_8sparse_fill_add_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_8sparse_fill_add_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_add_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_add_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_add_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":439 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_sub_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_sub_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_sub_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":451 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":452 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":454 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":460 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 460, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":461 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 461, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":463 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":464 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 464, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 464, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 464, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":469 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":470 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":472 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] - yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) - __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":473 * # use y fill value * out[out_i] = x[xi] - yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":476 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":477 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":478 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":479 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":477 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":480 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":470 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":482 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill - y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":484 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill - y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":485 * # use x fill value * out[out_i] = xfill - y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":488 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":489 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":490 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":491 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":489 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":492 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":482 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill - y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":494 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":495 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":498 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] - y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":499 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] - y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":500 * if xloc == yloc: * out[out_i] = x[xi] - y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":501 * out[out_i] = x[xi] - y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":504 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":505 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":506 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":507 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":505 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":509 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":510 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":511 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":512 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":510 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":498 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] - y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":514 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":516 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] - yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) - __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":517 * # use y fill value * out[out_i] = x[xi] - yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":520 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":521 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":522 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":523 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":521 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":514 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":526 * else: * # use x fill value * out[out_i] = xfill - y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":527 * # use x fill value * out[out_i] = xfill - y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":530 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":531 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":532 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":533 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill - yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":531 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":535 * ybp = 0 * * return out, out_index, xfill - yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble((__pyx_v_xfill - __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":439 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_sub_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_sub_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":540 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_sub_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_sub_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_sub_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":546 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":553 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 553, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":554 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 554, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":557 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":558 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 558, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 558, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 558, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":560 * out = np.empty(out_index.npoints, dtype=np.float64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 560, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":561 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 561, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":562 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 562, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":565 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":566 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill - y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":568 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill - y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":569 * # use x fill value * out[out_i] = xfill - y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":570 * out[out_i] = xfill - y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":566 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill - y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":572 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":574 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] - yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) - __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":575 * # use y fill value * out[out_i] = x[xi] - yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":576 * out[out_i] = x[xi] - yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":572 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":578 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":579 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":582 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] - y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":583 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] - y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":584 * if xloc == yloc: * out[out_i] = x[xi] - y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":585 * out[out_i] = x[xi] - y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":582 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] - y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":586 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":588 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] - yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) - __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":589 * # use y fill value * out[out_i] = x[xi] - yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":586 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":592 * else: * # use x fill value * out[out_i] = xfill - y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":593 * # use x fill value * out[out_i] = xfill - y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill - yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":595 * yi += 1 * * return out, out_index, xfill - yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble((__pyx_v_xfill - __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":540 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_sub_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_sub_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":598 * * * cpdef sparse_sub_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_11sparse_sub_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_sub_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_sub_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 598, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 598, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":603 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_sub_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":604 * * if isinstance(xindex, BlockIndex): * return block_op_sub_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 604, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 604, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 604, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":605 * if isinstance(xindex, BlockIndex): * return block_op_sub_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_sub_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 605, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 605, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":604 * * if isinstance(xindex, BlockIndex): * return block_op_sub_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_sub_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":603 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_sub_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":606 * return block_op_sub_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_sub_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":607 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_sub_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 607, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 607, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":608 * elif isinstance(xindex, IntIndex): * return int_op_sub_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 608, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 608, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 608, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":607 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_sub_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_sub_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":606 * return block_op_sub_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_sub_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":610 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 610, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":598 * * * cpdef sparse_sub_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_sub_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_11sparse_sub_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_11sparse_sub_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_sub_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub_float64", 1, 6, 6, 1); __PYX_ERR(2, 598, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub_float64", 1, 6, 6, 2); __PYX_ERR(2, 598, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub_float64", 1, 6, 6, 3); __PYX_ERR(2, 598, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub_float64", 1, 6, 6, 4); __PYX_ERR(2, 598, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub_float64", 1, 6, 6, 5); __PYX_ERR(2, 598, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_sub_float64") < 0)) __PYX_ERR(2, 598, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 599, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 601, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_sub_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 598, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_sub_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 598, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 599, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 600, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 601, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_10sparse_sub_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_10sparse_sub_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_sub_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 598, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 598, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_sub_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_sub_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":613 * * * cpdef sparse_fill_sub_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill - yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_13sparse_fill_sub_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_sub_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_sub_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":615 * cpdef sparse_fill_sub_float64(float64_t xfill, * float64_t yfill): * return xfill - yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble((__pyx_v_xfill - __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":613 * * * cpdef sparse_fill_sub_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill - yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_sub_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_13sparse_fill_sub_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_13sparse_fill_sub_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_sub_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_sub_float64", 1, 2, 2, 1); __PYX_ERR(2, 613, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_sub_float64") < 0)) __PYX_ERR(2, 613, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 613, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 614, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_sub_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 613, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_sub_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_12sparse_fill_sub_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_12sparse_fill_sub_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_sub_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_sub_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_sub_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":620 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_sub_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_sub_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_sub_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":632 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":633 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":635 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":641 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 641, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":642 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 642, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":644 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":645 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 645, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 645, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":650 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":651 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":653 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] - yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) - __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":654 * # use y fill value * out[out_i] = x[xi] - yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":657 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":658 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":659 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":660 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":658 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":661 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":651 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":663 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill - y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":665 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill - y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":666 * # use x fill value * out[out_i] = xfill - y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":669 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":670 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":671 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":672 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":670 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":673 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":663 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill - y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":675 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":676 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":679 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] - y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":680 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] - y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":681 * if xloc == yloc: * out[out_i] = x[xi] - y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":682 * out[out_i] = x[xi] - y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":685 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":686 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":687 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":688 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":686 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":690 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":691 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":692 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":693 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":691 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":679 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] - y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":695 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":697 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] - yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) - __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":698 * # use y fill value * out[out_i] = x[xi] - yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":701 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":702 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":703 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":704 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":702 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":695 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":707 * else: * # use x fill value * out[out_i] = xfill - y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":708 * # use x fill value * out[out_i] = xfill - y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":711 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":712 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":713 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":714 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill - yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":712 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":716 * ybp = 0 * * return out, out_index, xfill - yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill - __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":620 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_sub_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_sub_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":721 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_sub_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_sub_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_sub_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":727 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":734 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 734, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":735 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 735, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":738 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":739 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 739, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 739, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 739, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":741 * out = np.empty(out_index.npoints, dtype=np.int64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 741, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":742 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 742, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":743 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 743, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":746 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":747 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill - y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":749 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill - y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":750 * # use x fill value * out[out_i] = xfill - y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":751 * out[out_i] = xfill - y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":747 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill - y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":753 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":755 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] - yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) - __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":756 * # use y fill value * out[out_i] = x[xi] - yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":757 * out[out_i] = x[xi] - yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":753 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":759 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":760 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":763 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] - y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":764 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] - y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":765 * if xloc == yloc: * out[out_i] = x[xi] - y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":766 * out[out_i] = x[xi] - y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":763 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] - y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":767 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":769 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] - yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) - __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":770 * # use y fill value * out[out_i] = x[xi] - yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":767 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] - yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":773 * else: * # use x fill value * out[out_i] = xfill - y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":774 * # use x fill value * out[out_i] = xfill - y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill - yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":776 * yi += 1 * * return out, out_index, xfill - yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill - __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":721 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_sub_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_sub_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":779 * * * cpdef sparse_sub_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_15sparse_sub_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_sub_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_sub_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 779, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 779, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":784 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_sub_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":785 * * if isinstance(xindex, BlockIndex): * return block_op_sub_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 785, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 785, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 785, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":786 * if isinstance(xindex, BlockIndex): * return block_op_sub_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_sub_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 786, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 786, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 786, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":785 * * if isinstance(xindex, BlockIndex): * return block_op_sub_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_sub_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":784 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_sub_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":787 * return block_op_sub_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_sub_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":788 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_sub_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 788, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 788, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 788, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":789 * elif isinstance(xindex, IntIndex): * return int_op_sub_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 789, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 789, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 789, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":788 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_sub_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_sub_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":787 * return block_op_sub_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_sub_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":791 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 791, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":779 * * * cpdef sparse_sub_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_sub_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_15sparse_sub_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_15sparse_sub_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_sub_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub_int64", 1, 6, 6, 1); __PYX_ERR(2, 779, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub_int64", 1, 6, 6, 2); __PYX_ERR(2, 779, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub_int64", 1, 6, 6, 3); __PYX_ERR(2, 779, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub_int64", 1, 6, 6, 4); __PYX_ERR(2, 779, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_sub_int64", 1, 6, 6, 5); __PYX_ERR(2, 779, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_sub_int64") < 0)) __PYX_ERR(2, 779, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 780, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 782, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_sub_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 779, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_sub_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 779, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 780, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 781, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 782, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_14sparse_sub_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_14sparse_sub_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_sub_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 779, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 779, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_sub_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_sub_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":794 * * * cpdef sparse_fill_sub_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill - yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_17sparse_fill_sub_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_sub_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_sub_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":796 * cpdef sparse_fill_sub_int64(int64_t xfill, * int64_t yfill): * return xfill - yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill - __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":794 * * * cpdef sparse_fill_sub_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill - yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_sub_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_17sparse_fill_sub_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_17sparse_fill_sub_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_sub_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_sub_int64", 1, 2, 2, 1); __PYX_ERR(2, 794, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_sub_int64") < 0)) __PYX_ERR(2, 794, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 794, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 795, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_sub_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 794, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_sub_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_16sparse_fill_sub_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_16sparse_fill_sub_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_sub_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_sub_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_sub_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":801 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_mul_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_mul_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_mul_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":813 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":814 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":816 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":822 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 822, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":823 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 823, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":825 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":826 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 826, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 826, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 826, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":831 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":832 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":834 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] * yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) * __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":835 * # use y fill value * out[out_i] = x[xi] * yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":838 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":839 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":840 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":841 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":839 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":842 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":832 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":844 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill * y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":846 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill * y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":847 * # use x fill value * out[out_i] = xfill * y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":850 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":851 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":852 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":853 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":851 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":854 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":844 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill * y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":856 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":857 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":860 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] * y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":861 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] * y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":862 * if xloc == yloc: * out[out_i] = x[xi] * y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":863 * out[out_i] = x[xi] * y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":866 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":867 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":868 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":869 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":867 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":871 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":872 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":873 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":874 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":872 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":860 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] * y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":876 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":878 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] * yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) * __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":879 * # use y fill value * out[out_i] = x[xi] * yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":882 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":883 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":884 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":885 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":883 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":876 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":888 * else: * # use x fill value * out[out_i] = xfill * y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":889 * # use x fill value * out[out_i] = xfill * y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":892 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":893 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":894 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":895 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill * yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":893 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":897 * ybp = 0 * * return out, out_index, xfill * yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble((__pyx_v_xfill * __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":801 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_mul_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_mul_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":902 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_mul_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_mul_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_mul_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":908 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":915 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 915, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":916 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 916, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":919 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":920 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 920, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 920, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 920, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":922 * out = np.empty(out_index.npoints, dtype=np.float64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 922, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":923 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 923, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":924 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 924, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":927 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":928 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill * y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":930 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill * y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":931 * # use x fill value * out[out_i] = xfill * y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":932 * out[out_i] = xfill * y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":928 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill * y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":934 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":936 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] * yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) * __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":937 * # use y fill value * out[out_i] = x[xi] * yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":938 * out[out_i] = x[xi] * yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":934 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":940 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":941 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":944 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] * y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":945 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] * y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":946 * if xloc == yloc: * out[out_i] = x[xi] * y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":947 * out[out_i] = x[xi] * y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":944 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] * y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":948 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":950 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] * yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) * __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":951 * # use y fill value * out[out_i] = x[xi] * yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":948 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":954 * else: * # use x fill value * out[out_i] = xfill * y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":955 * # use x fill value * out[out_i] = xfill * y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill * yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":957 * yi += 1 * * return out, out_index, xfill * yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble((__pyx_v_xfill * __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":902 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_mul_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_mul_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":960 * * * cpdef sparse_mul_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_19sparse_mul_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_mul_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_mul_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 960, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 960, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":965 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_mul_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":966 * * if isinstance(xindex, BlockIndex): * return block_op_mul_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 966, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 966, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 966, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":967 * if isinstance(xindex, BlockIndex): * return block_op_mul_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_mul_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 967, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 967, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 967, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":966 * * if isinstance(xindex, BlockIndex): * return block_op_mul_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_mul_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":965 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_mul_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":968 * return block_op_mul_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_mul_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":969 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_mul_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 969, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 969, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 969, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":970 * elif isinstance(xindex, IntIndex): * return int_op_mul_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 970, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 970, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 970, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":969 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_mul_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_mul_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":968 * return block_op_mul_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_mul_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":972 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 972, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":960 * * * cpdef sparse_mul_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_mul_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_19sparse_mul_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_19sparse_mul_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_mul_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul_float64", 1, 6, 6, 1); __PYX_ERR(2, 960, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul_float64", 1, 6, 6, 2); __PYX_ERR(2, 960, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul_float64", 1, 6, 6, 3); __PYX_ERR(2, 960, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul_float64", 1, 6, 6, 4); __PYX_ERR(2, 960, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul_float64", 1, 6, 6, 5); __PYX_ERR(2, 960, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_mul_float64") < 0)) __PYX_ERR(2, 960, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 961, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 963, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_mul_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 960, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_mul_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 960, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 961, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 962, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 963, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_18sparse_mul_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_18sparse_mul_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_mul_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 960, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 960, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_mul_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_mul_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":975 * * * cpdef sparse_fill_mul_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill * yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_21sparse_fill_mul_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_mul_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_mul_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":977 * cpdef sparse_fill_mul_float64(float64_t xfill, * float64_t yfill): * return xfill * yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble((__pyx_v_xfill * __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":975 * * * cpdef sparse_fill_mul_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill * yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mul_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_21sparse_fill_mul_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_21sparse_fill_mul_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_mul_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_mul_float64", 1, 2, 2, 1); __PYX_ERR(2, 975, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_mul_float64") < 0)) __PYX_ERR(2, 975, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 975, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 976, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_mul_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 975, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mul_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_20sparse_fill_mul_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_20sparse_fill_mul_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_mul_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_mul_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mul_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":982 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_mul_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_mul_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_mul_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":994 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":995 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":997 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":1003 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1003, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1004 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1004, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1006 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1007 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1007, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1007, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1007, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1012 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1013 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1015 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] * yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) * __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1016 * # use y fill value * out[out_i] = x[xi] * yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1019 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1020 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1021 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1022 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1020 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1023 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1013 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":1025 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill * y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1027 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill * y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1028 * # use x fill value * out[out_i] = xfill * y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1031 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1032 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1033 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1034 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1032 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1035 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1025 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill * y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":1037 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":1038 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":1041 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] * y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1042 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] * y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1043 * if xloc == yloc: * out[out_i] = x[xi] * y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1044 * out[out_i] = x[xi] * y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1047 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1048 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1049 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1050 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1048 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1052 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1053 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1054 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1055 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1053 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1041 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] * y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1057 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1059 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] * yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) * __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1060 * # use y fill value * out[out_i] = x[xi] * yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1063 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1064 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1065 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1066 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1064 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1057 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1069 * else: * # use x fill value * out[out_i] = xfill * y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1070 * # use x fill value * out[out_i] = xfill * y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1073 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1074 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1075 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1076 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill * yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1074 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1078 * ybp = 0 * * return out, out_index, xfill * yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill * __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":982 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_mul_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_mul_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1083 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_mul_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_mul_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_mul_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1089 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":1096 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1096, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1097 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1097, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1100 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1101 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1101, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1101, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1103 * out = np.empty(out_index.npoints, dtype=np.int64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1103, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1104 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1104, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1105 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1105, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1108 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1109 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill * y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1111 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill * y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1112 * # use x fill value * out[out_i] = xfill * y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1113 * out[out_i] = xfill * y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1109 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill * y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":1115 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1117 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] * yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) * __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1118 * # use y fill value * out[out_i] = x[xi] * yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1119 * out[out_i] = x[xi] * yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1115 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":1121 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":1122 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":1125 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] * y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1126 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] * y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1127 * if xloc == yloc: * out[out_i] = x[xi] * y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1128 * out[out_i] = x[xi] * y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1125 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] * y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":1129 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1131 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] * yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) * __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1132 * # use y fill value * out[out_i] = x[xi] * yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1129 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] * yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":1135 * else: * # use x fill value * out[out_i] = xfill * y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1136 * # use x fill value * out[out_i] = xfill * y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill * yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1138 * yi += 1 * * return out, out_index, xfill * yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill * __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1083 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_mul_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_mul_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1141 * * * cpdef sparse_mul_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_23sparse_mul_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_mul_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_mul_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1141, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1141, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":1146 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_mul_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":1147 * * if isinstance(xindex, BlockIndex): * return block_op_mul_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1147, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 1147, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1148 * if isinstance(xindex, BlockIndex): * return block_op_mul_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_mul_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1148, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 1148, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1147 * * if isinstance(xindex, BlockIndex): * return block_op_mul_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_mul_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1146 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_mul_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1149 * return block_op_mul_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_mul_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":1150 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_mul_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1150, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 1150, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1151 * elif isinstance(xindex, IntIndex): * return int_op_mul_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1151, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 1151, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1150 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_mul_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_mul_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1149 * return block_op_mul_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_mul_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1153 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 1153, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":1141 * * * cpdef sparse_mul_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_mul_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_23sparse_mul_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_23sparse_mul_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_mul_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul_int64", 1, 6, 6, 1); __PYX_ERR(2, 1141, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul_int64", 1, 6, 6, 2); __PYX_ERR(2, 1141, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul_int64", 1, 6, 6, 3); __PYX_ERR(2, 1141, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul_int64", 1, 6, 6, 4); __PYX_ERR(2, 1141, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mul_int64", 1, 6, 6, 5); __PYX_ERR(2, 1141, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_mul_int64") < 0)) __PYX_ERR(2, 1141, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1142, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1144, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_mul_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1141, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_mul_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 1141, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 1142, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 1143, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 1144, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_22sparse_mul_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_22sparse_mul_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_mul_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1141, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1141, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_mul_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_mul_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1156 * * * cpdef sparse_fill_mul_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill * yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_25sparse_fill_mul_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_mul_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_mul_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":1158 * cpdef sparse_fill_mul_int64(int64_t xfill, * int64_t yfill): * return xfill * yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill * __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1156 * * * cpdef sparse_fill_mul_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill * yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mul_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_25sparse_fill_mul_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_25sparse_fill_mul_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_mul_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_mul_int64", 1, 2, 2, 1); __PYX_ERR(2, 1156, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_mul_int64") < 0)) __PYX_ERR(2, 1156, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1156, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1157, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_mul_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1156, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mul_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_24sparse_fill_mul_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_24sparse_fill_mul_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_mul_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_mul_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mul_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1163 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_div_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_div_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_div_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1175 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":1176 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1178 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":1184 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1184, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1185 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1185, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1187 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1188 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1188, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1188, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1193 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1194 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1196 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1197 * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1200 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1201 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1202 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1203 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1201 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1204 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1194 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1206 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1208 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1209 * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1212 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1213 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1214 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1215 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1213 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1216 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1206 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":1218 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":1219 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":1222 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __div_float64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1223 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __div_float64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1224 * if xloc == yloc: * out[out_i] = __div_float64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1225 * out[out_i] = __div_float64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1228 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1229 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1230 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1231 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1229 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1233 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1234 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1235 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1236 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1234 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1222 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __div_float64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1238 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1240 * elif xloc < yloc: * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1241 * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1244 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1245 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1246 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1247 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1245 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1238 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1250 * else: * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1251 * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1254 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1255 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1256 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1257 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, __div_float64(xfill, yfill) */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1255 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1259 * ybp = 0 * * return out, out_index, __div_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___div_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1163 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_div_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_div_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1264 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_div_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_div_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_div_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1270 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":1277 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1277, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1278 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1278, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1281 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1282 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1282, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1282, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1282, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1284 * out = np.empty(out_index.npoints, dtype=np.float64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1284, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1285 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1285, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1286 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1286, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1289 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1290 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1292 * if xi == xindex.npoints: * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1293 * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1294 * out[out_i] = __div_float64(xfill, y[yi]) * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1290 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":1296 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1298 * if yi == yindex.npoints: * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1299 * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1300 * out[out_i] = __div_float64(x[xi], yfill) * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1296 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1302 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":1303 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":1306 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __div_float64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1307 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __div_float64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1308 * if xloc == yloc: * out[out_i] = __div_float64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1309 * out[out_i] = __div_float64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1306 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __div_float64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":1310 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1312 * elif xloc < yloc: * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1313 * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1310 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_float64(x[xi], yfill) */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":1316 * else: * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1317 * # use x fill value * out[out_i] = __div_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, __div_float64(xfill, yfill) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1319 * yi += 1 * * return out, out_index, __div_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___div_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1264 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_div_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_div_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1322 * * * cpdef sparse_div_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_27sparse_div_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_div_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_div_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1322, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1322, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":1327 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_div_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":1328 * * if isinstance(xindex, BlockIndex): * return block_op_div_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1328, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 1328, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1329 * if isinstance(xindex, BlockIndex): * return block_op_div_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_div_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1329, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 1329, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1328 * * if isinstance(xindex, BlockIndex): * return block_op_div_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_div_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1327 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_div_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1330 * return block_op_div_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_div_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":1331 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_div_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1331, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1331, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 1331, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1332 * elif isinstance(xindex, IntIndex): * return int_op_div_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1332, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 1332, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1331 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_div_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_div_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1330 * return block_op_div_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_div_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1334 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 1334, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":1322 * * * cpdef sparse_div_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_div_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_27sparse_div_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_27sparse_div_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_div_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div_float64", 1, 6, 6, 1); __PYX_ERR(2, 1322, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div_float64", 1, 6, 6, 2); __PYX_ERR(2, 1322, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div_float64", 1, 6, 6, 3); __PYX_ERR(2, 1322, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div_float64", 1, 6, 6, 4); __PYX_ERR(2, 1322, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div_float64", 1, 6, 6, 5); __PYX_ERR(2, 1322, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_div_float64") < 0)) __PYX_ERR(2, 1322, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1323, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1325, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_div_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1322, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_div_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 1322, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 1323, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 1324, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 1325, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_26sparse_div_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_26sparse_div_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_div_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1322, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1322, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_div_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_div_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1337 * * * cpdef sparse_fill_div_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return __div_float64(xfill, yfill) */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_29sparse_fill_div_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_div_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_div_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":1339 * cpdef sparse_fill_div_float64(float64_t xfill, * float64_t yfill): * return __div_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___div_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1337 * * * cpdef sparse_fill_div_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return __div_float64(xfill, yfill) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_div_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_29sparse_fill_div_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_29sparse_fill_div_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_div_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_div_float64", 1, 2, 2, 1); __PYX_ERR(2, 1337, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_div_float64") < 0)) __PYX_ERR(2, 1337, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1337, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1338, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_div_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1337, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_div_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_28sparse_fill_div_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_28sparse_fill_div_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_div_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_div_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_div_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1344 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_div_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_div_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_div_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1356 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":1357 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1359 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":1365 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1365, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1366 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1366, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1368 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1369 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1369, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1369, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1374 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1375 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1377 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1378 * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1381 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1382 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1383 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1384 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1382 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1385 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1375 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1387 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1389 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1390 * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1393 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1394 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1395 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1396 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1394 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1397 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1387 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":1399 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":1400 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":1403 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __div_int64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1404 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __div_int64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1405 * if xloc == yloc: * out[out_i] = __div_int64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1406 * out[out_i] = __div_int64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1409 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1410 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1411 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1412 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1410 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1414 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1415 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1416 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1417 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1415 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1403 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __div_int64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1419 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1421 * elif xloc < yloc: * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1422 * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1425 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1426 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1427 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1428 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1426 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1419 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1431 * else: * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1432 * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1435 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1436 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1437 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1438 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, __div_int64(xfill, yfill) */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1436 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1440 * ybp = 0 * * return out, out_index, __div_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___div_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1344 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_div_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_div_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1445 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_div_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_div_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_div_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1451 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":1458 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1458, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1459 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1459, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1462 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1463 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1463, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1463, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1465 * out = np.empty(out_index.npoints, dtype=np.float64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1465, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1466 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1466, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1467 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1467, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1470 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1471 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1473 * if xi == xindex.npoints: * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1474 * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1475 * out[out_i] = __div_int64(xfill, y[yi]) * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1471 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":1477 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1479 * if yi == yindex.npoints: * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1480 * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1481 * out[out_i] = __div_int64(x[xi], yfill) * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1477 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1483 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":1484 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":1487 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __div_int64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1488 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __div_int64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1489 * if xloc == yloc: * out[out_i] = __div_int64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1490 * out[out_i] = __div_int64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1487 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __div_int64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":1491 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1493 * elif xloc < yloc: * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1494 * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1491 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __div_int64(x[xi], yfill) */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":1497 * else: * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___div_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1498 * # use x fill value * out[out_i] = __div_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, __div_int64(xfill, yfill) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1500 * yi += 1 * * return out, out_index, __div_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___div_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1445 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_div_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_div_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1503 * * * cpdef sparse_div_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_31sparse_div_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_div_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_div_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1503, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1503, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":1508 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_div_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":1509 * * if isinstance(xindex, BlockIndex): * return block_op_div_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1509, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1509, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 1509, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1510 * if isinstance(xindex, BlockIndex): * return block_op_div_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_div_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1510, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1510, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 1510, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1509 * * if isinstance(xindex, BlockIndex): * return block_op_div_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_div_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1508 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_div_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1511 * return block_op_div_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_div_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":1512 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_div_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1512, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 1512, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1513 * elif isinstance(xindex, IntIndex): * return int_op_div_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1513, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 1513, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1512 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_div_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_div_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1511 * return block_op_div_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_div_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1515 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 1515, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":1503 * * * cpdef sparse_div_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_div_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_31sparse_div_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_31sparse_div_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_div_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div_int64", 1, 6, 6, 1); __PYX_ERR(2, 1503, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div_int64", 1, 6, 6, 2); __PYX_ERR(2, 1503, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div_int64", 1, 6, 6, 3); __PYX_ERR(2, 1503, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div_int64", 1, 6, 6, 4); __PYX_ERR(2, 1503, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_div_int64", 1, 6, 6, 5); __PYX_ERR(2, 1503, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_div_int64") < 0)) __PYX_ERR(2, 1503, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1504, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1506, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_div_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1503, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_div_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 1503, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 1504, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 1505, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 1506, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_30sparse_div_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_30sparse_div_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_div_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1503, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1503, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_div_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_div_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1518 * * * cpdef sparse_fill_div_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return __div_int64(xfill, yfill) */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_33sparse_fill_div_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_div_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_div_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":1520 * cpdef sparse_fill_div_int64(int64_t xfill, * int64_t yfill): * return __div_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___div_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1518 * * * cpdef sparse_fill_div_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return __div_int64(xfill, yfill) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_div_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_33sparse_fill_div_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_33sparse_fill_div_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_div_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_div_int64", 1, 2, 2, 1); __PYX_ERR(2, 1518, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_div_int64") < 0)) __PYX_ERR(2, 1518, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1518, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1519, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_div_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1518, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_div_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_32sparse_fill_div_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_32sparse_fill_div_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_div_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_div_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_div_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1525 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_mod_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_mod_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_mod_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1537 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":1538 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1540 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":1546 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1546, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1547 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1547, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1549 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1550 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1550, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1550, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1555 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1556 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1558 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1559 * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1562 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1563 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1564 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1565 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1563 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1566 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1556 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1568 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1570 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1571 * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1574 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1575 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1576 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1577 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1575 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1578 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1568 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":1580 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":1581 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":1584 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __mod_float64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1585 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __mod_float64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1586 * if xloc == yloc: * out[out_i] = __mod_float64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1587 * out[out_i] = __mod_float64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1590 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1591 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1592 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1593 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1591 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1595 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1596 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1597 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1598 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1596 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1584 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __mod_float64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1600 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1602 * elif xloc < yloc: * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1603 * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1606 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1607 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1608 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1609 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1607 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1600 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1612 * else: * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1613 * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1616 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1617 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1618 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1619 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, __mod_float64(xfill, yfill) */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1617 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1621 * ybp = 0 * * return out, out_index, __mod_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___mod_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1525 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_mod_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_mod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1626 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_mod_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_mod_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_mod_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1632 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":1639 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1639, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1640 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1640, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1643 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1644 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1644, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1644, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1644, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1646 * out = np.empty(out_index.npoints, dtype=np.float64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1646, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1647 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1647, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1648 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1648, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1651 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1652 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1654 * if xi == xindex.npoints: * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1655 * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1656 * out[out_i] = __mod_float64(xfill, y[yi]) * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1652 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":1658 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1660 * if yi == yindex.npoints: * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1661 * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1662 * out[out_i] = __mod_float64(x[xi], yfill) * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1658 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1664 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":1665 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":1668 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __mod_float64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1669 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __mod_float64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1670 * if xloc == yloc: * out[out_i] = __mod_float64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1671 * out[out_i] = __mod_float64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1668 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __mod_float64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":1672 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1674 * elif xloc < yloc: * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1675 * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1672 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_float64(x[xi], yfill) */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":1678 * else: * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1679 * # use x fill value * out[out_i] = __mod_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, __mod_float64(xfill, yfill) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1681 * yi += 1 * * return out, out_index, __mod_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___mod_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1626 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_mod_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_mod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1684 * * * cpdef sparse_mod_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_35sparse_mod_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_mod_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_mod_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1684, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1684, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":1689 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_mod_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":1690 * * if isinstance(xindex, BlockIndex): * return block_op_mod_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1690, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1690, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 1690, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1691 * if isinstance(xindex, BlockIndex): * return block_op_mod_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_mod_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1691, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 1691, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1690 * * if isinstance(xindex, BlockIndex): * return block_op_mod_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_mod_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1689 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_mod_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1692 * return block_op_mod_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_mod_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":1693 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_mod_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1693, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 1693, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1694 * elif isinstance(xindex, IntIndex): * return int_op_mod_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1694, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1694, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 1694, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1693 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_mod_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_mod_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1692 * return block_op_mod_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_mod_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1696 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 1696, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":1684 * * * cpdef sparse_mod_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_mod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_35sparse_mod_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_35sparse_mod_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_mod_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mod_float64", 1, 6, 6, 1); __PYX_ERR(2, 1684, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mod_float64", 1, 6, 6, 2); __PYX_ERR(2, 1684, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mod_float64", 1, 6, 6, 3); __PYX_ERR(2, 1684, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mod_float64", 1, 6, 6, 4); __PYX_ERR(2, 1684, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mod_float64", 1, 6, 6, 5); __PYX_ERR(2, 1684, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_mod_float64") < 0)) __PYX_ERR(2, 1684, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1685, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1687, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_mod_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1684, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_mod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 1684, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 1685, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 1686, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 1687, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_34sparse_mod_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_34sparse_mod_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_mod_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1684, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1684, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_mod_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_mod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1699 * * * cpdef sparse_fill_mod_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return __mod_float64(xfill, yfill) */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_37sparse_fill_mod_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_mod_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_mod_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":1701 * cpdef sparse_fill_mod_float64(float64_t xfill, * float64_t yfill): * return __mod_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___mod_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1699 * * * cpdef sparse_fill_mod_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return __mod_float64(xfill, yfill) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_37sparse_fill_mod_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_37sparse_fill_mod_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_mod_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_mod_float64", 1, 2, 2, 1); __PYX_ERR(2, 1699, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_mod_float64") < 0)) __PYX_ERR(2, 1699, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1699, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1700, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_mod_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1699, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_36sparse_fill_mod_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_36sparse_fill_mod_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_mod_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_mod_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mod_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1706 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_mod_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_mod_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_mod_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1718 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":1719 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1721 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":1727 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1727, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1728 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1728, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1730 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1731 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1731, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1731, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1731, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1736 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1737 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1739 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1740 * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1743 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1744 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1745 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1746 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1744 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1747 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1737 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1749 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1751 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1752 * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1755 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1756 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1757 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1758 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1756 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1759 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1749 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":1761 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":1762 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":1765 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __mod_int64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1766 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __mod_int64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1767 * if xloc == yloc: * out[out_i] = __mod_int64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1768 * out[out_i] = __mod_int64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1771 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1772 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1773 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1774 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1772 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1776 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1777 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1778 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1779 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1777 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1765 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __mod_int64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1781 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1783 * elif xloc < yloc: * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1784 * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1787 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1788 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1789 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1790 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1788 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1781 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1793 * else: * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1794 * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1797 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1798 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1799 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1800 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, __mod_int64(xfill, yfill) */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1798 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1802 * ybp = 0 * * return out, out_index, __mod_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__pyx_f_6pandas_5_libs_6sparse___mod_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1706 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_mod_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_mod_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1807 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_mod_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_mod_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_mod_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1813 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":1820 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1820, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1821 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1821, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1824 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1825 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1825, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1825, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1825, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1827 * out = np.empty(out_index.npoints, dtype=np.int64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1827, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1828 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1828, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1829 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1829, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1832 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1833 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1835 * if xi == xindex.npoints: * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1836 * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1837 * out[out_i] = __mod_int64(xfill, y[yi]) * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1833 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":1839 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1841 * if yi == yindex.npoints: * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1842 * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1843 * out[out_i] = __mod_int64(x[xi], yfill) * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1839 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1845 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":1846 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":1849 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __mod_int64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1850 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __mod_int64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1851 * if xloc == yloc: * out[out_i] = __mod_int64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1852 * out[out_i] = __mod_int64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1849 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __mod_int64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":1853 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1855 * elif xloc < yloc: * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1856 * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1853 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __mod_int64(x[xi], yfill) */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":1859 * else: * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___mod_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1860 * # use x fill value * out[out_i] = __mod_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, __mod_int64(xfill, yfill) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1862 * yi += 1 * * return out, out_index, __mod_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__pyx_f_6pandas_5_libs_6sparse___mod_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1807 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_mod_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_mod_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1865 * * * cpdef sparse_mod_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_39sparse_mod_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_mod_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_mod_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1865, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1865, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":1870 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_mod_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":1871 * * if isinstance(xindex, BlockIndex): * return block_op_mod_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1871, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1871, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 1871, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1872 * if isinstance(xindex, BlockIndex): * return block_op_mod_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_mod_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1872, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1872, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 1872, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1871 * * if isinstance(xindex, BlockIndex): * return block_op_mod_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_mod_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1870 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_mod_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1873 * return block_op_mod_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_mod_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":1874 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_mod_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1874, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 1874, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1875 * elif isinstance(xindex, IntIndex): * return int_op_mod_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1875, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1875, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 1875, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":1874 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_mod_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_mod_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1873 * return block_op_mod_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_mod_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1877 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 1877, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":1865 * * * cpdef sparse_mod_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_mod_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_39sparse_mod_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_39sparse_mod_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_mod_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mod_int64", 1, 6, 6, 1); __PYX_ERR(2, 1865, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mod_int64", 1, 6, 6, 2); __PYX_ERR(2, 1865, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mod_int64", 1, 6, 6, 3); __PYX_ERR(2, 1865, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mod_int64", 1, 6, 6, 4); __PYX_ERR(2, 1865, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_mod_int64", 1, 6, 6, 5); __PYX_ERR(2, 1865, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_mod_int64") < 0)) __PYX_ERR(2, 1865, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1866, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1868, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_mod_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1865, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_mod_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 1865, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 1866, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 1867, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 1868, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_38sparse_mod_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_38sparse_mod_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_mod_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1865, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 1865, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_mod_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_mod_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1880 * * * cpdef sparse_fill_mod_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return __mod_int64(xfill, yfill) */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_41sparse_fill_mod_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_mod_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_mod_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":1882 * cpdef sparse_fill_mod_int64(int64_t xfill, * int64_t yfill): * return __mod_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_f_6pandas_5_libs_6sparse___mod_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1880 * * * cpdef sparse_fill_mod_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return __mod_int64(xfill, yfill) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mod_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_41sparse_fill_mod_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_41sparse_fill_mod_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_mod_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_mod_int64", 1, 2, 2, 1); __PYX_ERR(2, 1880, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_mod_int64") < 0)) __PYX_ERR(2, 1880, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1880, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1881, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_mod_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1880, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mod_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_40sparse_fill_mod_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_40sparse_fill_mod_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_mod_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_mod_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_mod_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1887 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_truediv_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_truediv_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_truediv_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1899 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":1900 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1902 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":1908 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1908, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":1909 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1909, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":1911 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1912 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 1912, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 1912, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 1912, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":1917 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":1918 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1920 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1921 * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1924 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1925 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1926 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1927 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1925 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1928 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1918 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":1930 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1932 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1933 * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1936 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1937 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1938 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1939 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1937 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1940 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":1930 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":1942 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":1943 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":1946 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __truediv_float64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1947 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __truediv_float64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1948 * if xloc == yloc: * out[out_i] = __truediv_float64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1949 * out[out_i] = __truediv_float64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1952 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1953 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1954 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1955 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1953 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1957 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1958 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1959 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1960 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1958 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1946 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __truediv_float64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1962 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1964 * elif xloc < yloc: * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":1965 * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1968 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1969 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1970 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1971 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1969 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":1962 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":1974 * else: * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":1975 * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":1978 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":1979 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":1980 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":1981 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, __truediv_float64(xfill, yfill) */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":1979 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":1983 * ybp = 0 * * return out, out_index, __truediv_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___truediv_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 1983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1887 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_truediv_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_truediv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":1988 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_truediv_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_truediv_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_truediv_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":1994 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2001 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2001, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2002 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2002, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2005 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2006 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2006, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2006, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2006, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2008 * out = np.empty(out_index.npoints, dtype=np.float64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2008, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2009 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2009, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2010 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2010, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2013 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2014 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2016 * if xi == xindex.npoints: * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2017 * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2018 * out[out_i] = __truediv_float64(xfill, y[yi]) * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2014 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":2020 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2022 * if yi == yindex.npoints: * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2023 * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2024 * out[out_i] = __truediv_float64(x[xi], yfill) * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2020 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2026 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2027 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2030 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __truediv_float64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2031 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __truediv_float64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2032 * if xloc == yloc: * out[out_i] = __truediv_float64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2033 * out[out_i] = __truediv_float64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2030 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __truediv_float64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2034 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2036 * elif xloc < yloc: * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2037 * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2034 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_float64(x[xi], yfill) */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2040 * else: * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2041 * # use x fill value * out[out_i] = __truediv_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, __truediv_float64(xfill, yfill) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2043 * yi += 1 * * return out, out_index, __truediv_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___truediv_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":1988 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_truediv_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_truediv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2046 * * * cpdef sparse_truediv_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_43sparse_truediv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_truediv_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_truediv_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2046, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2046, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":2051 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_truediv_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":2052 * * if isinstance(xindex, BlockIndex): * return block_op_truediv_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2052, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2052, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2052, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2053 * if isinstance(xindex, BlockIndex): * return block_op_truediv_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_truediv_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2053, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2053, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2052 * * if isinstance(xindex, BlockIndex): * return block_op_truediv_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_truediv_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2051 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_truediv_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2054 * return block_op_truediv_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_truediv_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":2055 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_truediv_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2055, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2055, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2056 * elif isinstance(xindex, IntIndex): * return int_op_truediv_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2056, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2056, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2056, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2055 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_truediv_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_truediv_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2054 * return block_op_truediv_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_truediv_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2058 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 2058, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":2046 * * * cpdef sparse_truediv_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_truediv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_43sparse_truediv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_43sparse_truediv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_truediv_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_truediv_float64", 1, 6, 6, 1); __PYX_ERR(2, 2046, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_truediv_float64", 1, 6, 6, 2); __PYX_ERR(2, 2046, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_truediv_float64", 1, 6, 6, 3); __PYX_ERR(2, 2046, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_truediv_float64", 1, 6, 6, 4); __PYX_ERR(2, 2046, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_truediv_float64", 1, 6, 6, 5); __PYX_ERR(2, 2046, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_truediv_float64") < 0)) __PYX_ERR(2, 2046, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2047, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2049, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_truediv_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2046, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_truediv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 2046, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 2047, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 2048, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 2049, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_42sparse_truediv_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_42sparse_truediv_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_truediv_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2046, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2046, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_truediv_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_truediv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2061 * * * cpdef sparse_fill_truediv_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return __truediv_float64(xfill, yfill) */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_45sparse_fill_truediv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_truediv_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_truediv_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":2063 * cpdef sparse_fill_truediv_float64(float64_t xfill, * float64_t yfill): * return __truediv_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___truediv_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2061 * * * cpdef sparse_fill_truediv_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return __truediv_float64(xfill, yfill) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_truediv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_45sparse_fill_truediv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_45sparse_fill_truediv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_truediv_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_truediv_float64", 1, 2, 2, 1); __PYX_ERR(2, 2061, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_truediv_float64") < 0)) __PYX_ERR(2, 2061, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2061, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2062, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_truediv_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2061, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_truediv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_44sparse_fill_truediv_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_44sparse_fill_truediv_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_truediv_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_truediv_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_truediv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2068 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_truediv_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_truediv_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_truediv_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2080 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2081 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2083 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":2089 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2089, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2090 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2090, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2092 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2093 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2093, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2093, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2093, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2098 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2099 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2101 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2102 * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2105 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2106 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2107 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2108 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2106 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2109 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2099 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2111 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2113 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2114 * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2117 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2118 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2119 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2120 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2118 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2121 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2111 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":2123 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":2124 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":2127 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __truediv_int64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2128 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __truediv_int64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2129 * if xloc == yloc: * out[out_i] = __truediv_int64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2130 * out[out_i] = __truediv_int64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2133 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2134 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2135 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2136 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2134 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2138 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2139 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2140 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2141 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2139 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2127 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __truediv_int64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":2143 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2145 * elif xloc < yloc: * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2146 * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2149 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2150 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2151 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2152 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2150 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2143 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":2155 * else: * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2156 * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2159 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2160 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2161 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2162 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, __truediv_int64(xfill, yfill) */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2160 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2164 * ybp = 0 * * return out, out_index, __truediv_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___truediv_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2068 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_truediv_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_truediv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2169 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_truediv_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_truediv_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_truediv_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2175 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2182 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2182, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2183 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2183, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2186 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2187 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2187, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2187, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2189 * out = np.empty(out_index.npoints, dtype=np.float64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2189, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2190 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2190, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2191 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2191, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2194 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2195 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2197 * if xi == xindex.npoints: * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2198 * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2199 * out[out_i] = __truediv_int64(xfill, y[yi]) * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2195 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":2201 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2203 * if yi == yindex.npoints: * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2204 * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2205 * out[out_i] = __truediv_int64(x[xi], yfill) * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2201 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2207 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2208 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2211 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __truediv_int64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2212 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __truediv_int64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2213 * if xloc == yloc: * out[out_i] = __truediv_int64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2214 * out[out_i] = __truediv_int64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2211 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __truediv_int64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2215 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2217 * elif xloc < yloc: * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2218 * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2215 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __truediv_int64(x[xi], yfill) */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2221 * else: * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___truediv_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2222 * # use x fill value * out[out_i] = __truediv_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, __truediv_int64(xfill, yfill) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2224 * yi += 1 * * return out, out_index, __truediv_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___truediv_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2169 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_truediv_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_truediv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2227 * * * cpdef sparse_truediv_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_47sparse_truediv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_truediv_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_truediv_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2227, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2227, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":2232 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_truediv_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":2233 * * if isinstance(xindex, BlockIndex): * return block_op_truediv_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2233, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2233, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2234 * if isinstance(xindex, BlockIndex): * return block_op_truediv_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_truediv_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2234, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2234, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2233 * * if isinstance(xindex, BlockIndex): * return block_op_truediv_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_truediv_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2232 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_truediv_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2235 * return block_op_truediv_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_truediv_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":2236 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_truediv_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2236, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2236, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2237 * elif isinstance(xindex, IntIndex): * return int_op_truediv_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2237, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2237, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2236 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_truediv_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_truediv_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2235 * return block_op_truediv_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_truediv_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2239 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 2239, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":2227 * * * cpdef sparse_truediv_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_truediv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_47sparse_truediv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_47sparse_truediv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_truediv_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_truediv_int64", 1, 6, 6, 1); __PYX_ERR(2, 2227, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_truediv_int64", 1, 6, 6, 2); __PYX_ERR(2, 2227, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_truediv_int64", 1, 6, 6, 3); __PYX_ERR(2, 2227, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_truediv_int64", 1, 6, 6, 4); __PYX_ERR(2, 2227, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_truediv_int64", 1, 6, 6, 5); __PYX_ERR(2, 2227, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_truediv_int64") < 0)) __PYX_ERR(2, 2227, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2228, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2230, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_truediv_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2227, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_truediv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 2227, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 2228, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 2229, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 2230, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_46sparse_truediv_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_46sparse_truediv_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_truediv_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2227, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2227, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_truediv_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_truediv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2242 * * * cpdef sparse_fill_truediv_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return __truediv_int64(xfill, yfill) */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_49sparse_fill_truediv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_truediv_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_truediv_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":2244 * cpdef sparse_fill_truediv_int64(int64_t xfill, * int64_t yfill): * return __truediv_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___truediv_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2242 * * * cpdef sparse_fill_truediv_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return __truediv_int64(xfill, yfill) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_truediv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_49sparse_fill_truediv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_49sparse_fill_truediv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_truediv_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_truediv_int64", 1, 2, 2, 1); __PYX_ERR(2, 2242, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_truediv_int64") < 0)) __PYX_ERR(2, 2242, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2242, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2243, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_truediv_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2242, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_truediv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_48sparse_fill_truediv_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_48sparse_fill_truediv_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_truediv_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_truediv_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_truediv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2249 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_floordiv_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_floordiv_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_floordiv_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2261 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2262 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2264 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":2270 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2270, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2271 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2271, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2273 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2274 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2274, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2274, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2274, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2279 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2280 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2282 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2283 * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2286 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2287 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2288 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2289 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2287 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2290 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2280 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2292 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2294 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2295 * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2298 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2299 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2300 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2301 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2299 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2302 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2292 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":2304 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":2305 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":2308 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __floordiv_float64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2309 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __floordiv_float64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2310 * if xloc == yloc: * out[out_i] = __floordiv_float64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2311 * out[out_i] = __floordiv_float64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2314 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2315 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2316 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2317 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2315 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2319 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2320 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2321 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2322 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2320 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2308 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __floordiv_float64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":2324 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2326 * elif xloc < yloc: * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2327 * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2330 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2331 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2332 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2333 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2331 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2324 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":2336 * else: * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2337 * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2340 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2341 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2342 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2343 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, __floordiv_float64(xfill, yfill) */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2341 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2345 * ybp = 0 * * return out, out_index, __floordiv_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___floordiv_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2249 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_floordiv_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_floordiv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2350 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_floordiv_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_floordiv_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_floordiv_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2356 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2363 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2363, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2364 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2364, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2367 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2368 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2368, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2368, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2370 * out = np.empty(out_index.npoints, dtype=np.float64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2370, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2371 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2371, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2372 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2372, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2375 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2376 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2378 * if xi == xindex.npoints: * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2379 * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2380 * out[out_i] = __floordiv_float64(xfill, y[yi]) * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2376 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":2382 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2384 * if yi == yindex.npoints: * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2385 * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2386 * out[out_i] = __floordiv_float64(x[xi], yfill) * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2382 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2388 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2389 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2392 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __floordiv_float64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2393 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __floordiv_float64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2394 * if xloc == yloc: * out[out_i] = __floordiv_float64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2395 * out[out_i] = __floordiv_float64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2392 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __floordiv_float64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2396 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2398 * elif xloc < yloc: * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_float64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2399 * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2396 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_float64(x[xi], yfill) */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2402 * else: * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_float64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2403 * # use x fill value * out[out_i] = __floordiv_float64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, __floordiv_float64(xfill, yfill) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2405 * yi += 1 * * return out, out_index, __floordiv_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___floordiv_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2350 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_floordiv_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_floordiv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2408 * * * cpdef sparse_floordiv_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_51sparse_floordiv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_floordiv_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_floordiv_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2408, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2408, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":2413 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_floordiv_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":2414 * * if isinstance(xindex, BlockIndex): * return block_op_floordiv_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2414, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2414, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2414, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2415 * if isinstance(xindex, BlockIndex): * return block_op_floordiv_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_floordiv_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2415, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2415, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2414 * * if isinstance(xindex, BlockIndex): * return block_op_floordiv_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_floordiv_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2413 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_floordiv_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2416 * return block_op_floordiv_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_floordiv_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":2417 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_floordiv_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2417, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2417, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2417, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2418 * elif isinstance(xindex, IntIndex): * return int_op_floordiv_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2418, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2418, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2418, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2417 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_floordiv_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_floordiv_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2416 * return block_op_floordiv_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_floordiv_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2420 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 2420, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":2408 * * * cpdef sparse_floordiv_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_floordiv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_51sparse_floordiv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_51sparse_floordiv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_floordiv_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv_float64", 1, 6, 6, 1); __PYX_ERR(2, 2408, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv_float64", 1, 6, 6, 2); __PYX_ERR(2, 2408, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv_float64", 1, 6, 6, 3); __PYX_ERR(2, 2408, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv_float64", 1, 6, 6, 4); __PYX_ERR(2, 2408, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv_float64", 1, 6, 6, 5); __PYX_ERR(2, 2408, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_floordiv_float64") < 0)) __PYX_ERR(2, 2408, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2409, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2411, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_floordiv_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2408, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_floordiv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 2408, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 2409, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 2410, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 2411, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_50sparse_floordiv_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_50sparse_floordiv_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_floordiv_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2408, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2408, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_floordiv_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_floordiv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2423 * * * cpdef sparse_fill_floordiv_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return __floordiv_float64(xfill, yfill) */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_53sparse_fill_floordiv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_floordiv_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_floordiv_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":2425 * cpdef sparse_fill_floordiv_float64(float64_t xfill, * float64_t yfill): * return __floordiv_float64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6pandas_5_libs_6sparse___floordiv_float64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2423 * * * cpdef sparse_fill_floordiv_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return __floordiv_float64(xfill, yfill) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_floordiv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_53sparse_fill_floordiv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_53sparse_fill_floordiv_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_floordiv_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_floordiv_float64", 1, 2, 2, 1); __PYX_ERR(2, 2423, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_floordiv_float64") < 0)) __PYX_ERR(2, 2423, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2423, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2424, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_floordiv_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2423, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_floordiv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_52sparse_fill_floordiv_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_52sparse_fill_floordiv_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_floordiv_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_floordiv_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_floordiv_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2430 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_floordiv_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_floordiv_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_floordiv_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2442 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2443 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2445 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":2451 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2451, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2452 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2452, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2454 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2455 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2455, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2455, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2460 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2461 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2463 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2464 * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2467 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2468 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2469 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2470 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2468 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2471 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2461 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2473 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2475 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2476 * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2479 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2480 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2481 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2482 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2480 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2483 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2473 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":2485 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":2486 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":2489 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __floordiv_int64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2490 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __floordiv_int64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2491 * if xloc == yloc: * out[out_i] = __floordiv_int64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2492 * out[out_i] = __floordiv_int64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2495 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2496 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2497 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2498 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2496 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2500 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2501 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2502 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2503 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2501 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2489 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __floordiv_int64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":2505 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2507 * elif xloc < yloc: * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2508 * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2511 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2512 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2513 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2514 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2512 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2505 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":2517 * else: * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2518 * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2521 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2522 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2523 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2524 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, __floordiv_int64(xfill, yfill) */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2522 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2526 * ybp = 0 * * return out, out_index, __floordiv_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__pyx_f_6pandas_5_libs_6sparse___floordiv_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2430 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_floordiv_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_floordiv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2531 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_floordiv_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_floordiv_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_floordiv_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2537 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2544 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2544, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2545 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2545, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2548 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2549 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2549, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2549, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2549, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2551 * out = np.empty(out_index.npoints, dtype=np.int64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2551, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2552 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2552, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2553 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2553, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2556 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2557 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2559 * if xi == xindex.npoints: * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2560 * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2561 * out[out_i] = __floordiv_int64(xfill, y[yi]) * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2557 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) */ } /* "pandas/_libs/sparse_op_helper.pxi":2563 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2565 * if yi == yindex.npoints: * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2566 * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2567 * out[out_i] = __floordiv_int64(x[xi], yfill) * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2563 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2569 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2570 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2573 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __floordiv_int64(x[xi], y[yi]) * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2574 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = __floordiv_int64(x[xi], y[yi]) # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2575 * if xloc == yloc: * out[out_i] = __floordiv_int64(x[xi], y[yi]) * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2576 * out[out_i] = __floordiv_int64(x[xi], y[yi]) * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2573 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = __floordiv_int64(x[xi], y[yi]) * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2577 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2579 * elif xloc < yloc: * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2580 * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2577 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = __floordiv_int64(x[xi], yfill) */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2583 * else: * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __pyx_f_6pandas_5_libs_6sparse___floordiv_int64(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2584 * # use x fill value * out[out_i] = __floordiv_int64(xfill, y[yi]) * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, __floordiv_int64(xfill, yfill) */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2586 * yi += 1 * * return out, out_index, __floordiv_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__pyx_f_6pandas_5_libs_6sparse___floordiv_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2531 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_floordiv_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_floordiv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2589 * * * cpdef sparse_floordiv_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_55sparse_floordiv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_floordiv_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_floordiv_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2589, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2589, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":2594 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_floordiv_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":2595 * * if isinstance(xindex, BlockIndex): * return block_op_floordiv_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2595, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2595, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2595, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2596 * if isinstance(xindex, BlockIndex): * return block_op_floordiv_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_floordiv_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2596, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2596, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2595 * * if isinstance(xindex, BlockIndex): * return block_op_floordiv_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_floordiv_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2594 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_floordiv_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2597 * return block_op_floordiv_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_floordiv_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":2598 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_floordiv_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2598, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2598, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2598, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2599 * elif isinstance(xindex, IntIndex): * return int_op_floordiv_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2599, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2599, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2599, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2598 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_floordiv_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_floordiv_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2597 * return block_op_floordiv_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_floordiv_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2601 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 2601, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":2589 * * * cpdef sparse_floordiv_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_floordiv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_55sparse_floordiv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_55sparse_floordiv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_floordiv_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv_int64", 1, 6, 6, 1); __PYX_ERR(2, 2589, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv_int64", 1, 6, 6, 2); __PYX_ERR(2, 2589, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv_int64", 1, 6, 6, 3); __PYX_ERR(2, 2589, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv_int64", 1, 6, 6, 4); __PYX_ERR(2, 2589, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_floordiv_int64", 1, 6, 6, 5); __PYX_ERR(2, 2589, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_floordiv_int64") < 0)) __PYX_ERR(2, 2589, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2590, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2592, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_floordiv_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2589, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_floordiv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 2589, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 2590, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 2591, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 2592, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_54sparse_floordiv_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_54sparse_floordiv_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_floordiv_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2589, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2589, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_floordiv_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_floordiv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2604 * * * cpdef sparse_fill_floordiv_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return __floordiv_int64(xfill, yfill) */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_57sparse_fill_floordiv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_floordiv_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_floordiv_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":2606 * cpdef sparse_fill_floordiv_int64(int64_t xfill, * int64_t yfill): * return __floordiv_int64(xfill, yfill) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__pyx_f_6pandas_5_libs_6sparse___floordiv_int64(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2604 * * * cpdef sparse_fill_floordiv_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return __floordiv_int64(xfill, yfill) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_floordiv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_57sparse_fill_floordiv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_57sparse_fill_floordiv_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_floordiv_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_floordiv_int64", 1, 2, 2, 1); __PYX_ERR(2, 2604, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_floordiv_int64") < 0)) __PYX_ERR(2, 2604, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2604, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2605, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_floordiv_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2604, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_floordiv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_56sparse_fill_floordiv_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_56sparse_fill_floordiv_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_floordiv_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_floordiv_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_floordiv_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2611 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_pow_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_pow_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_pow_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2623 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2624 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2626 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":2632 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2632, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2633 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2633, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2635 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2636 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2636, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2636, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2641 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2642 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2644 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] ** yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = pow((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2645 * # use y fill value * out[out_i] = x[xi] ** yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2648 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2649 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2650 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2651 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2649 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2652 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2642 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":2654 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill ** y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2656 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill ** y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = pow(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2657 * # use x fill value * out[out_i] = xfill ** y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2660 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2661 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2662 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2663 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2661 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2664 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2654 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill ** y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":2666 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":2667 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":2670 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] ** y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2671 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] ** y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = pow((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2672 * if xloc == yloc: * out[out_i] = x[xi] ** y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2673 * out[out_i] = x[xi] ** y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2676 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2677 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2678 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2679 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2677 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2681 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2682 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2683 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2684 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2682 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2670 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] ** y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":2686 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2688 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] ** yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = pow((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2689 * # use y fill value * out[out_i] = x[xi] ** yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2692 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2693 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2694 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2695 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2693 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2686 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":2698 * else: * # use x fill value * out[out_i] = xfill ** y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = pow(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2699 * # use x fill value * out[out_i] = xfill ** y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2702 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2703 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2704 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2705 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill ** yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2703 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2707 * ybp = 0 * * return out, out_index, xfill ** yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(pow(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2611 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_pow_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_pow_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2712 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_pow_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_pow_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_pow_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2718 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2725 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2725, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2726 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2726, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2729 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.float64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2730 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.float64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2730, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2730, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2732 * out = np.empty(out_index.npoints, dtype=np.float64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2732, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2733 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2733, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2734 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2734, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2737 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2738 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill ** y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2740 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill ** y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = pow(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2741 * # use x fill value * out[out_i] = xfill ** y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2742 * out[out_i] = xfill ** y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2738 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill ** y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":2744 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2746 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] ** yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = pow((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2747 * # use y fill value * out[out_i] = x[xi] ** yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2748 * out[out_i] = x[xi] ** yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2744 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":2750 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2751 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2754 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] ** y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2755 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] ** y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = pow((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2756 * if xloc == yloc: * out[out_i] = x[xi] ** y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2757 * out[out_i] = x[xi] ** y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2754 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] ** y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2758 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2760 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] ** yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = pow((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2761 * # use y fill value * out[out_i] = x[xi] ** yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2758 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2764 * else: * # use x fill value * out[out_i] = xfill ** y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = pow(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2765 * # use x fill value * out[out_i] = xfill ** y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill ** yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2767 * yi += 1 * * return out, out_index, xfill ** yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyFloat_FromDouble(pow(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2712 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_pow_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_pow_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2770 * * * cpdef sparse_pow_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_59sparse_pow_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_pow_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_pow_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2770, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2770, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":2775 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_pow_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":2776 * * if isinstance(xindex, BlockIndex): * return block_op_pow_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2776, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2776, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2776, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2777 * if isinstance(xindex, BlockIndex): * return block_op_pow_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_pow_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2777, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2777, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2777, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2776 * * if isinstance(xindex, BlockIndex): * return block_op_pow_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_pow_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2775 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_pow_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2778 * return block_op_pow_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_pow_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":2779 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_pow_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2779, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2779, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2779, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2780 * elif isinstance(xindex, IntIndex): * return int_op_pow_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2780, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2780, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2780, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2779 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_pow_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_pow_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2778 * return block_op_pow_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_pow_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2782 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 2782, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":2770 * * * cpdef sparse_pow_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_pow_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_59sparse_pow_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_59sparse_pow_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_pow_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow_float64", 1, 6, 6, 1); __PYX_ERR(2, 2770, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow_float64", 1, 6, 6, 2); __PYX_ERR(2, 2770, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow_float64", 1, 6, 6, 3); __PYX_ERR(2, 2770, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow_float64", 1, 6, 6, 4); __PYX_ERR(2, 2770, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow_float64", 1, 6, 6, 5); __PYX_ERR(2, 2770, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_pow_float64") < 0)) __PYX_ERR(2, 2770, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2771, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2773, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_pow_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2770, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_pow_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 2770, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 2771, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 2772, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 2773, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_58sparse_pow_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_58sparse_pow_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_pow_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2770, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2770, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_pow_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_pow_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2785 * * * cpdef sparse_fill_pow_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill ** yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_61sparse_fill_pow_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_pow_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_pow_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":2787 * cpdef sparse_fill_pow_float64(float64_t xfill, * float64_t yfill): * return xfill ** yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(pow(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2785 * * * cpdef sparse_fill_pow_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill ** yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_pow_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_61sparse_fill_pow_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_61sparse_fill_pow_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_pow_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_pow_float64", 1, 2, 2, 1); __PYX_ERR(2, 2785, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_pow_float64") < 0)) __PYX_ERR(2, 2785, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2785, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2786, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_pow_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2785, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_pow_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_60sparse_fill_pow_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_60sparse_fill_pow_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_pow_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_pow_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_pow_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2792 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_pow_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_pow_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_pow_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2804 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2805 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2807 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":2813 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2813, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2814 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2814, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2816 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2817 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2817, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2817, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2817, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2822 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2823 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2825 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] ** yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_pow___pyx_t_5numpy_int64_t((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2826 * # use y fill value * out[out_i] = x[xi] ** yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2829 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2830 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2831 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2832 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2830 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2833 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2823 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":2835 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill ** y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2837 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill ** y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_pow___pyx_t_5numpy_int64_t(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2838 * # use x fill value * out[out_i] = xfill ** y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2841 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2842 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2843 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2844 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2842 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2845 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2835 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill ** y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":2847 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":2848 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":2851 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] ** y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2852 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] ** y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_pow___pyx_t_5numpy_int64_t((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2853 * if xloc == yloc: * out[out_i] = x[xi] ** y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2854 * out[out_i] = x[xi] ** y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2857 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2858 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2859 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2860 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2858 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2862 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2863 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2864 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2865 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2863 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2851 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] ** y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":2867 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2869 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] ** yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_pow___pyx_t_5numpy_int64_t((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2870 * # use y fill value * out[out_i] = x[xi] ** yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2873 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2874 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2875 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2876 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2874 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":2867 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":2879 * else: * # use x fill value * out[out_i] = xfill ** y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_pow___pyx_t_5numpy_int64_t(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2880 * # use x fill value * out[out_i] = xfill ** y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2883 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":2884 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2885 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":2886 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill ** yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2884 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2888 * ybp = 0 * * return out, out_index, xfill ** yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__Pyx_pow___pyx_t_5numpy_int64_t(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2792 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_pow_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_pow_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2893 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_pow_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_pow_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_pow_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2899 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2906 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2906, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2907 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2907, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2910 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.int64) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2911 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.int64) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2911, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2911, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2911, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2913 * out = np.empty(out_index.npoints, dtype=np.int64) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2913, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2914 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2914, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2915 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2915, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2918 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":2919 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill ** y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2921 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill ** y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_pow___pyx_t_5numpy_int64_t(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2922 * # use x fill value * out[out_i] = xfill ** y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2923 * out[out_i] = xfill ** y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2919 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill ** y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":2925 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2927 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] ** yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_pow___pyx_t_5numpy_int64_t((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2928 * # use y fill value * out[out_i] = x[xi] ** yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2929 * out[out_i] = x[xi] ** yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":2925 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":2931 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2932 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":2935 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] ** y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2936 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] ** y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_pow___pyx_t_5numpy_int64_t((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2937 * if xloc == yloc: * out[out_i] = x[xi] ** y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2938 * out[out_i] = x[xi] ** y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2935 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] ** y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2939 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":2941 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] ** yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_pow___pyx_t_5numpy_int64_t((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)), __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":2942 * # use y fill value * out[out_i] = x[xi] ** yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":2939 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] ** yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":2945 * else: * # use x fill value * out[out_i] = xfill ** y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = __Pyx_pow___pyx_t_5numpy_int64_t(__pyx_v_xfill, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":2946 * # use x fill value * out[out_i] = xfill ** y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill ** yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":2948 * yi += 1 * * return out, out_index, xfill ** yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64(__Pyx_pow___pyx_t_5numpy_int64_t(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2893 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_pow_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_pow_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2951 * * * cpdef sparse_pow_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_63sparse_pow_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_pow_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_pow_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2951, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2951, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":2956 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_pow_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":2957 * * if isinstance(xindex, BlockIndex): * return block_op_pow_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2957, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2957, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2957, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2958 * if isinstance(xindex, BlockIndex): * return block_op_pow_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_pow_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2958, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2958, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 2958, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2957 * * if isinstance(xindex, BlockIndex): * return block_op_pow_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_pow_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2956 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_pow_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2959 * return block_op_pow_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_pow_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":2960 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_pow_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2960, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2960, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2960, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2961 * elif isinstance(xindex, IntIndex): * return int_op_pow_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2961, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 2961, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 2961, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":2960 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_pow_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_pow_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 2960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2959 * return block_op_pow_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_pow_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":2963 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 2963, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":2951 * * * cpdef sparse_pow_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_pow_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_63sparse_pow_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_63sparse_pow_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_pow_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow_int64", 1, 6, 6, 1); __PYX_ERR(2, 2951, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow_int64", 1, 6, 6, 2); __PYX_ERR(2, 2951, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow_int64", 1, 6, 6, 3); __PYX_ERR(2, 2951, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow_int64", 1, 6, 6, 4); __PYX_ERR(2, 2951, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_pow_int64", 1, 6, 6, 5); __PYX_ERR(2, 2951, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_pow_int64") < 0)) __PYX_ERR(2, 2951, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2952, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2954, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_pow_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2951, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_pow_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 2951, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 2952, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 2953, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 2954, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_62sparse_pow_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_62sparse_pow_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_pow_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2951, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 2951, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_pow_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_pow_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2966 * * * cpdef sparse_fill_pow_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill ** yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_65sparse_fill_pow_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_pow_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_pow_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":2968 * cpdef sparse_fill_pow_int64(int64_t xfill, * int64_t yfill): * return xfill ** yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64(__Pyx_pow___pyx_t_5numpy_int64_t(__pyx_v_xfill, __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2966 * * * cpdef sparse_fill_pow_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill ** yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_pow_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_65sparse_fill_pow_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_65sparse_fill_pow_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_pow_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_pow_int64", 1, 2, 2, 1); __PYX_ERR(2, 2966, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_pow_int64") < 0)) __PYX_ERR(2, 2966, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2966, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 2967, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_pow_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 2966, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_pow_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_64sparse_fill_pow_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_64sparse_fill_pow_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_pow_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_pow_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_pow_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":2973 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_eq_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_eq_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_eq_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":2985 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":2986 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":2988 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":2994 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2994, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":2995 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2995, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":2997 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":2998 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 2998, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 2998, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 2998, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3003 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3004 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3006 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] == yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) == __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3007 * # use y fill value * out[out_i] = x[xi] == yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3010 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3011 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3012 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3013 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3011 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3014 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3004 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3016 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill == y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3018 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill == y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3019 * # use x fill value * out[out_i] = xfill == y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3022 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3023 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3024 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3025 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3023 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3026 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3016 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill == y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3028 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":3029 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":3032 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] == y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3033 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] == y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3034 * if xloc == yloc: * out[out_i] = x[xi] == y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3035 * out[out_i] = x[xi] == y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3038 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3039 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3040 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3041 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3039 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3043 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3044 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3045 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3046 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3044 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3032 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] == y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3048 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3050 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] == yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) == __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3051 * # use y fill value * out[out_i] = x[xi] == yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3054 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3055 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3056 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3057 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3055 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3048 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3060 * else: * # use x fill value * out[out_i] = xfill == y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3061 * # use x fill value * out[out_i] = xfill == y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3064 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3065 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3066 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3067 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill == yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3065 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3069 * ybp = 0 * * return out, out_index, xfill == yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill == __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":2973 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_eq_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_eq_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3074 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_eq_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_eq_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_eq_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3080 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3087 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3087, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3088 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3088, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3091 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3092 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3092, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3092, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3092, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3094 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3094, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3095 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3095, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3096 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3096, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3099 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3100 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill == y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3102 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill == y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3103 * # use x fill value * out[out_i] = xfill == y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3104 * out[out_i] = xfill == y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3100 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill == y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3106 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3108 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] == yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) == __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3109 * # use y fill value * out[out_i] = x[xi] == yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3110 * out[out_i] = x[xi] == yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3106 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3112 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":3113 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":3116 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] == y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3117 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] == y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3118 * if xloc == yloc: * out[out_i] = x[xi] == y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3119 * out[out_i] = x[xi] == y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3116 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] == y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":3120 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3122 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] == yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) == __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3123 * # use y fill value * out[out_i] = x[xi] == yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3120 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":3126 * else: * # use x fill value * out[out_i] = xfill == y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3127 * # use x fill value * out[out_i] = xfill == y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill == yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3129 * yi += 1 * * return out, out_index, xfill == yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill == __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3074 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_eq_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_eq_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3132 * * * cpdef sparse_eq_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_67sparse_eq_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_eq_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_eq_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3132, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3132, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":3137 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_eq_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":3138 * * if isinstance(xindex, BlockIndex): * return block_op_eq_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3138, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 3138, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3139 * if isinstance(xindex, BlockIndex): * return block_op_eq_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_eq_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3139, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 3139, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3138 * * if isinstance(xindex, BlockIndex): * return block_op_eq_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_eq_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3137 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_eq_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":3140 * return block_op_eq_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_eq_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":3141 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_eq_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3141, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 3141, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3142 * elif isinstance(xindex, IntIndex): * return int_op_eq_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3142, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 3142, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3141 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_eq_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_eq_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3140 * return block_op_eq_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_eq_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":3144 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 3144, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":3132 * * * cpdef sparse_eq_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_eq_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_67sparse_eq_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_67sparse_eq_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_eq_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_eq_float64", 1, 6, 6, 1); __PYX_ERR(2, 3132, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_eq_float64", 1, 6, 6, 2); __PYX_ERR(2, 3132, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_eq_float64", 1, 6, 6, 3); __PYX_ERR(2, 3132, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_eq_float64", 1, 6, 6, 4); __PYX_ERR(2, 3132, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_eq_float64", 1, 6, 6, 5); __PYX_ERR(2, 3132, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_eq_float64") < 0)) __PYX_ERR(2, 3132, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3133, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3135, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_eq_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3132, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_eq_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 3132, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 3133, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 3134, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 3135, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_66sparse_eq_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_66sparse_eq_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_eq_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3132, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3132, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_eq_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_eq_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3147 * * * cpdef sparse_fill_eq_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill == yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_69sparse_fill_eq_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_eq_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_eq_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":3149 * cpdef sparse_fill_eq_float64(float64_t xfill, * float64_t yfill): * return xfill == yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill == __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3147 * * * cpdef sparse_fill_eq_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill == yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_eq_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_69sparse_fill_eq_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_69sparse_fill_eq_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_eq_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_eq_float64", 1, 2, 2, 1); __PYX_ERR(2, 3147, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_eq_float64") < 0)) __PYX_ERR(2, 3147, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3147, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3148, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_eq_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3147, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_eq_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_68sparse_fill_eq_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_68sparse_fill_eq_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_eq_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_eq_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_eq_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3154 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_eq_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_eq_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_eq_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3166 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3167 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3169 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":3175 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3175, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3176 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3176, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3178 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3179 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3179, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3179, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3184 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3185 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3187 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] == yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) == __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3188 * # use y fill value * out[out_i] = x[xi] == yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3191 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3192 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3193 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3194 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3192 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3195 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3185 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3197 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill == y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3199 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill == y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3200 * # use x fill value * out[out_i] = xfill == y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3203 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3204 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3205 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3206 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3204 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3207 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3197 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill == y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3209 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":3210 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":3213 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] == y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3214 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] == y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3215 * if xloc == yloc: * out[out_i] = x[xi] == y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3216 * out[out_i] = x[xi] == y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3219 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3220 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3221 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3222 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3220 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3224 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3225 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3226 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3227 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3225 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3213 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] == y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3229 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3231 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] == yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) == __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3232 * # use y fill value * out[out_i] = x[xi] == yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3235 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3236 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3237 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3238 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3236 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3229 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3241 * else: * # use x fill value * out[out_i] = xfill == y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3242 * # use x fill value * out[out_i] = xfill == y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3245 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3246 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3247 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3248 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill == yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3246 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3250 * ybp = 0 * * return out, out_index, xfill == yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill == __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3154 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_eq_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_eq_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3255 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_eq_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_eq_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_eq_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3261 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3268 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3268, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3269 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3269, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3272 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3273 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3273, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3273, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3275 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3275, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3276 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3276, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3277 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3277, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3280 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3281 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill == y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3283 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill == y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3284 * # use x fill value * out[out_i] = xfill == y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3285 * out[out_i] = xfill == y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3281 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill == y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3287 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3289 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] == yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) == __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3290 * # use y fill value * out[out_i] = x[xi] == yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3291 * out[out_i] = x[xi] == yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3287 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3293 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":3294 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":3297 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] == y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3298 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] == y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3299 * if xloc == yloc: * out[out_i] = x[xi] == y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3300 * out[out_i] = x[xi] == y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3297 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] == y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":3301 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3303 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] == yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) == __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3304 * # use y fill value * out[out_i] = x[xi] == yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3301 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] == yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":3307 * else: * # use x fill value * out[out_i] = xfill == y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3308 * # use x fill value * out[out_i] = xfill == y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill == yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3310 * yi += 1 * * return out, out_index, xfill == yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill == __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3255 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_eq_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_eq_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3313 * * * cpdef sparse_eq_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_71sparse_eq_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_eq_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_eq_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3313, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3313, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":3318 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_eq_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":3319 * * if isinstance(xindex, BlockIndex): * return block_op_eq_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3319, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 3319, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3320 * if isinstance(xindex, BlockIndex): * return block_op_eq_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_eq_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3320, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3320, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 3320, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3319 * * if isinstance(xindex, BlockIndex): * return block_op_eq_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_eq_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3318 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_eq_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":3321 * return block_op_eq_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_eq_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":3322 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_eq_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3322, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 3322, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3323 * elif isinstance(xindex, IntIndex): * return int_op_eq_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3323, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 3323, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3322 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_eq_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_eq_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3321 * return block_op_eq_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_eq_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":3325 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 3325, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":3313 * * * cpdef sparse_eq_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_eq_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_71sparse_eq_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_71sparse_eq_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_eq_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_eq_int64", 1, 6, 6, 1); __PYX_ERR(2, 3313, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_eq_int64", 1, 6, 6, 2); __PYX_ERR(2, 3313, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_eq_int64", 1, 6, 6, 3); __PYX_ERR(2, 3313, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_eq_int64", 1, 6, 6, 4); __PYX_ERR(2, 3313, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_eq_int64", 1, 6, 6, 5); __PYX_ERR(2, 3313, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_eq_int64") < 0)) __PYX_ERR(2, 3313, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3314, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3316, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_eq_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3313, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_eq_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 3313, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 3314, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 3315, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 3316, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_70sparse_eq_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_70sparse_eq_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_eq_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3313, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3313, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_eq_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_eq_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3328 * * * cpdef sparse_fill_eq_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill == yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_73sparse_fill_eq_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_eq_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_eq_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":3330 * cpdef sparse_fill_eq_int64(int64_t xfill, * int64_t yfill): * return xfill == yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill == __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3328 * * * cpdef sparse_fill_eq_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill == yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_eq_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_73sparse_fill_eq_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_73sparse_fill_eq_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_eq_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_eq_int64", 1, 2, 2, 1); __PYX_ERR(2, 3328, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_eq_int64") < 0)) __PYX_ERR(2, 3328, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3328, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3329, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_eq_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3328, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_eq_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_72sparse_fill_eq_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_72sparse_fill_eq_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_eq_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_eq_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_eq_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3335 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_ne_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_ne_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_ne_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3347 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3348 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3350 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":3356 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3356, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3357 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3357, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3359 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3360 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3360, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3360, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3360, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3365 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3366 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3368 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] != yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) != __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3369 * # use y fill value * out[out_i] = x[xi] != yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3372 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3373 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3374 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3375 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3373 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3376 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3366 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3378 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill != y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3380 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill != y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3381 * # use x fill value * out[out_i] = xfill != y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3384 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3385 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3386 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3387 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3385 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3388 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3378 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill != y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3390 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":3391 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":3394 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] != y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3395 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] != y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3396 * if xloc == yloc: * out[out_i] = x[xi] != y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3397 * out[out_i] = x[xi] != y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3400 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3401 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3402 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3403 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3401 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3405 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3406 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3407 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3408 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3406 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3394 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] != y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3410 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3412 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] != yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) != __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3413 * # use y fill value * out[out_i] = x[xi] != yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3416 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3417 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3418 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3419 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3417 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3410 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3422 * else: * # use x fill value * out[out_i] = xfill != y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3423 * # use x fill value * out[out_i] = xfill != y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3426 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3427 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3428 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3429 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill != yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3427 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3431 * ybp = 0 * * return out, out_index, xfill != yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill != __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3335 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_ne_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_ne_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3436 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_ne_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_ne_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_ne_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3442 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3449 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3449, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3450 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3450, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3453 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3454 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3454, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3454, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3454, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3456 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3456, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3457 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3457, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3458 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3458, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3461 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3462 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill != y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3464 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill != y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3465 * # use x fill value * out[out_i] = xfill != y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3466 * out[out_i] = xfill != y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3462 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill != y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3468 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3470 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] != yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) != __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3471 * # use y fill value * out[out_i] = x[xi] != yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3472 * out[out_i] = x[xi] != yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3468 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3474 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":3475 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":3478 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] != y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3479 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] != y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3480 * if xloc == yloc: * out[out_i] = x[xi] != y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3481 * out[out_i] = x[xi] != y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3478 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] != y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":3482 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3484 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] != yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) != __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3485 * # use y fill value * out[out_i] = x[xi] != yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3482 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":3488 * else: * # use x fill value * out[out_i] = xfill != y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3489 * # use x fill value * out[out_i] = xfill != y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill != yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3491 * yi += 1 * * return out, out_index, xfill != yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill != __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3436 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_ne_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_ne_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3494 * * * cpdef sparse_ne_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_75sparse_ne_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_ne_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_ne_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3494, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3494, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":3499 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_ne_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":3500 * * if isinstance(xindex, BlockIndex): * return block_op_ne_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3500, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 3500, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3501 * if isinstance(xindex, BlockIndex): * return block_op_ne_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_ne_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3501, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 3501, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3500 * * if isinstance(xindex, BlockIndex): * return block_op_ne_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_ne_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3499 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_ne_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":3502 * return block_op_ne_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_ne_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":3503 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_ne_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3503, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 3503, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3504 * elif isinstance(xindex, IntIndex): * return int_op_ne_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3504, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3504, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 3504, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3503 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_ne_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_ne_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3502 * return block_op_ne_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_ne_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":3506 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 3506, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":3494 * * * cpdef sparse_ne_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_ne_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_75sparse_ne_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_75sparse_ne_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_ne_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ne_float64", 1, 6, 6, 1); __PYX_ERR(2, 3494, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ne_float64", 1, 6, 6, 2); __PYX_ERR(2, 3494, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ne_float64", 1, 6, 6, 3); __PYX_ERR(2, 3494, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ne_float64", 1, 6, 6, 4); __PYX_ERR(2, 3494, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ne_float64", 1, 6, 6, 5); __PYX_ERR(2, 3494, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_ne_float64") < 0)) __PYX_ERR(2, 3494, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3495, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3497, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_ne_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3494, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_ne_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 3494, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 3495, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 3496, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 3497, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_74sparse_ne_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_74sparse_ne_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_ne_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3494, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3494, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_ne_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_ne_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3509 * * * cpdef sparse_fill_ne_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill != yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_77sparse_fill_ne_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_ne_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_ne_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":3511 * cpdef sparse_fill_ne_float64(float64_t xfill, * float64_t yfill): * return xfill != yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill != __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3509 * * * cpdef sparse_fill_ne_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill != yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ne_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_77sparse_fill_ne_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_77sparse_fill_ne_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_ne_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_ne_float64", 1, 2, 2, 1); __PYX_ERR(2, 3509, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_ne_float64") < 0)) __PYX_ERR(2, 3509, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3509, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3510, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_ne_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3509, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ne_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_76sparse_fill_ne_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_76sparse_fill_ne_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_ne_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_ne_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ne_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3516 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_ne_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_ne_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_ne_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3528 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3529 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3531 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":3537 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3537, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3538 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3538, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3540 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3541 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3541, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3541, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3541, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3546 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3547 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3549 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] != yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) != __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3550 * # use y fill value * out[out_i] = x[xi] != yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3553 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3554 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3555 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3556 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3554 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3557 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3547 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3559 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill != y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3561 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill != y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3562 * # use x fill value * out[out_i] = xfill != y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3565 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3566 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3567 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3568 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3566 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3569 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3559 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill != y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3571 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":3572 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":3575 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] != y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3576 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] != y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3577 * if xloc == yloc: * out[out_i] = x[xi] != y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3578 * out[out_i] = x[xi] != y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3581 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3582 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3583 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3584 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3582 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3586 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3587 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3588 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3589 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3587 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3575 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] != y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3591 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3593 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] != yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) != __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3594 * # use y fill value * out[out_i] = x[xi] != yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3597 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3598 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3599 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3600 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3598 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3591 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3603 * else: * # use x fill value * out[out_i] = xfill != y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3604 * # use x fill value * out[out_i] = xfill != y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3607 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3608 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3609 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3610 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill != yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3608 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3612 * ybp = 0 * * return out, out_index, xfill != yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill != __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3516 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_ne_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_ne_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3617 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_ne_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_ne_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_ne_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3623 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3630 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3630, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3631 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3631, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3634 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3635 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3635, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3635, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3635, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3637 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3637, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3638 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3638, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3639 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3639, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3642 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3643 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill != y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3645 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill != y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3646 * # use x fill value * out[out_i] = xfill != y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3647 * out[out_i] = xfill != y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3643 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill != y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3649 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3651 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] != yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) != __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3652 * # use y fill value * out[out_i] = x[xi] != yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3653 * out[out_i] = x[xi] != yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3649 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3655 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":3656 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":3659 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] != y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3660 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] != y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3661 * if xloc == yloc: * out[out_i] = x[xi] != y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3662 * out[out_i] = x[xi] != y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3659 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] != y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":3663 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3665 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] != yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) != __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3666 * # use y fill value * out[out_i] = x[xi] != yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3663 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] != yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":3669 * else: * # use x fill value * out[out_i] = xfill != y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3670 * # use x fill value * out[out_i] = xfill != y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill != yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3672 * yi += 1 * * return out, out_index, xfill != yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill != __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3617 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_ne_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_ne_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3675 * * * cpdef sparse_ne_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_79sparse_ne_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_ne_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_ne_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3675, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3675, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":3680 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_ne_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":3681 * * if isinstance(xindex, BlockIndex): * return block_op_ne_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3681, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3681, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 3681, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3682 * if isinstance(xindex, BlockIndex): * return block_op_ne_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_ne_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3682, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3682, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 3682, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3681 * * if isinstance(xindex, BlockIndex): * return block_op_ne_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_ne_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3680 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_ne_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":3683 * return block_op_ne_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_ne_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":3684 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_ne_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3684, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 3684, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3685 * elif isinstance(xindex, IntIndex): * return int_op_ne_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3685, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 3685, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3684 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_ne_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_ne_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3683 * return block_op_ne_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_ne_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":3687 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 3687, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":3675 * * * cpdef sparse_ne_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_ne_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_79sparse_ne_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_79sparse_ne_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_ne_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ne_int64", 1, 6, 6, 1); __PYX_ERR(2, 3675, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ne_int64", 1, 6, 6, 2); __PYX_ERR(2, 3675, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ne_int64", 1, 6, 6, 3); __PYX_ERR(2, 3675, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ne_int64", 1, 6, 6, 4); __PYX_ERR(2, 3675, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ne_int64", 1, 6, 6, 5); __PYX_ERR(2, 3675, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_ne_int64") < 0)) __PYX_ERR(2, 3675, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3676, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3678, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_ne_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3675, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_ne_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 3675, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 3676, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 3677, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 3678, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_78sparse_ne_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_78sparse_ne_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_ne_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3675, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3675, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_ne_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_ne_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3690 * * * cpdef sparse_fill_ne_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill != yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_81sparse_fill_ne_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_ne_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_ne_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":3692 * cpdef sparse_fill_ne_int64(int64_t xfill, * int64_t yfill): * return xfill != yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill != __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3690 * * * cpdef sparse_fill_ne_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill != yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ne_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_81sparse_fill_ne_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_81sparse_fill_ne_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_ne_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_ne_int64", 1, 2, 2, 1); __PYX_ERR(2, 3690, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_ne_int64") < 0)) __PYX_ERR(2, 3690, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3690, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3691, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_ne_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3690, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ne_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_80sparse_fill_ne_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_80sparse_fill_ne_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_ne_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_ne_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ne_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3697 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_lt_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_lt_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_lt_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3709 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3710 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3712 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":3718 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3718, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3719 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3719, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3721 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3722 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3722, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3722, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3722, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3727 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3728 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3730 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] < yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) < __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3731 * # use y fill value * out[out_i] = x[xi] < yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3734 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3735 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3736 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3737 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3735 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3738 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3728 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3740 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill < y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3742 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill < y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3743 * # use x fill value * out[out_i] = xfill < y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3746 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3747 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3748 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3749 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3747 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3750 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3740 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill < y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3752 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":3753 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":3756 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] < y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3757 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] < y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3758 * if xloc == yloc: * out[out_i] = x[xi] < y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3759 * out[out_i] = x[xi] < y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3762 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3763 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3764 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3765 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3763 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3767 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3768 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3769 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3770 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3768 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3756 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] < y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3772 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3774 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] < yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) < __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3775 * # use y fill value * out[out_i] = x[xi] < yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3778 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3779 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3780 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3781 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3779 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3772 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3784 * else: * # use x fill value * out[out_i] = xfill < y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3785 * # use x fill value * out[out_i] = xfill < y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3788 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3789 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3790 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3791 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill < yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3789 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3793 * ybp = 0 * * return out, out_index, xfill < yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill < __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3697 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_lt_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_lt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3798 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_lt_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_lt_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_lt_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3804 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3811 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3811, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3812 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3812, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3815 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3816 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3816, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3816, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3816, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3818 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3818, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3819 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3819, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3820 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3820, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3823 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3824 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill < y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3826 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill < y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3827 * # use x fill value * out[out_i] = xfill < y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3828 * out[out_i] = xfill < y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3824 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill < y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3830 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3832 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] < yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) < __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3833 * # use y fill value * out[out_i] = x[xi] < yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3834 * out[out_i] = x[xi] < yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3830 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3836 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":3837 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":3840 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] < y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3841 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] < y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3842 * if xloc == yloc: * out[out_i] = x[xi] < y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3843 * out[out_i] = x[xi] < y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3840 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] < y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":3844 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3846 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] < yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) < __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3847 * # use y fill value * out[out_i] = x[xi] < yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3844 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":3850 * else: * # use x fill value * out[out_i] = xfill < y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3851 * # use x fill value * out[out_i] = xfill < y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill < yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3853 * yi += 1 * * return out, out_index, xfill < yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill < __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3798 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_lt_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_lt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3856 * * * cpdef sparse_lt_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_83sparse_lt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_lt_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_lt_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3856, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3856, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":3861 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_lt_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":3862 * * if isinstance(xindex, BlockIndex): * return block_op_lt_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3862, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3862, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 3862, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3863 * if isinstance(xindex, BlockIndex): * return block_op_lt_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_lt_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3863, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3863, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 3863, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3862 * * if isinstance(xindex, BlockIndex): * return block_op_lt_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_lt_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3861 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_lt_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":3864 * return block_op_lt_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_lt_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":3865 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_lt_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3865, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3865, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 3865, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3866 * elif isinstance(xindex, IntIndex): * return int_op_lt_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3866, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3866, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 3866, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":3865 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_lt_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_lt_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3864 * return block_op_lt_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_lt_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":3868 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 3868, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":3856 * * * cpdef sparse_lt_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_lt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_83sparse_lt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_83sparse_lt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_lt_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_lt_float64", 1, 6, 6, 1); __PYX_ERR(2, 3856, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_lt_float64", 1, 6, 6, 2); __PYX_ERR(2, 3856, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_lt_float64", 1, 6, 6, 3); __PYX_ERR(2, 3856, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_lt_float64", 1, 6, 6, 4); __PYX_ERR(2, 3856, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_lt_float64", 1, 6, 6, 5); __PYX_ERR(2, 3856, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_lt_float64") < 0)) __PYX_ERR(2, 3856, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3857, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3859, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_lt_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3856, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_lt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 3856, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 3857, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 3858, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 3859, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_82sparse_lt_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_82sparse_lt_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_lt_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3856, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 3856, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_lt_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_lt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3871 * * * cpdef sparse_fill_lt_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill < yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_85sparse_fill_lt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_lt_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_lt_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":3873 * cpdef sparse_fill_lt_float64(float64_t xfill, * float64_t yfill): * return xfill < yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill < __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3871 * * * cpdef sparse_fill_lt_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill < yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_lt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_85sparse_fill_lt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_85sparse_fill_lt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_lt_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_lt_float64", 1, 2, 2, 1); __PYX_ERR(2, 3871, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_lt_float64") < 0)) __PYX_ERR(2, 3871, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3871, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 3872, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_lt_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 3871, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_lt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_84sparse_fill_lt_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_84sparse_fill_lt_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_lt_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_lt_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_lt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3878 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_lt_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_lt_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_lt_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3890 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3891 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3893 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":3899 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3899, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3900 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3900, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3902 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3903 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3903, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3903, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3908 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":3909 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3911 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] < yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) < __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3912 * # use y fill value * out[out_i] = x[xi] < yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3915 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3916 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3917 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3918 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3916 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3919 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3909 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":3921 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill < y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3923 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill < y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3924 * # use x fill value * out[out_i] = xfill < y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3927 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3928 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3929 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3930 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3928 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3931 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":3921 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill < y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":3933 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":3934 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":3937 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] < y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3938 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] < y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3939 * if xloc == yloc: * out[out_i] = x[xi] < y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3940 * out[out_i] = x[xi] < y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3943 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3944 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3945 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3946 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3944 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3948 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3949 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3950 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3951 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3949 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3937 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] < y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3953 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3955 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] < yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) < __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":3956 * # use y fill value * out[out_i] = x[xi] < yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3959 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3960 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3961 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3962 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3960 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":3953 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":3965 * else: * # use x fill value * out[out_i] = xfill < y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":3966 * # use x fill value * out[out_i] = xfill < y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":3969 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":3970 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":3971 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":3972 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill < yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":3970 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":3974 * ybp = 0 * * return out, out_index, xfill < yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill < __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3878 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_lt_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_lt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":3979 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_lt_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_lt_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_lt_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":3985 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":3992 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3992, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":3993 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3993, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":3996 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3997 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 3997, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 3997, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3997, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":3999 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 3999, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4000 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4000, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4001 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4001, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4004 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4005 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill < y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4007 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill < y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4008 * # use x fill value * out[out_i] = xfill < y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4009 * out[out_i] = xfill < y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4005 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill < y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4011 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4013 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] < yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) < __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4014 * # use y fill value * out[out_i] = x[xi] < yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4015 * out[out_i] = x[xi] < yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4011 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4017 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4018 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4021 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] < y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4022 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] < y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4023 * if xloc == yloc: * out[out_i] = x[xi] < y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4024 * out[out_i] = x[xi] < y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4021 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] < y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4025 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4027 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] < yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) < __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4028 * # use y fill value * out[out_i] = x[xi] < yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4025 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] < yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4031 * else: * # use x fill value * out[out_i] = xfill < y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4032 * # use x fill value * out[out_i] = xfill < y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill < yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4034 * yi += 1 * * return out, out_index, xfill < yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill < __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":3979 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_lt_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_lt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4037 * * * cpdef sparse_lt_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_87sparse_lt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_lt_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_lt_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4037, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4037, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":4042 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_lt_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":4043 * * if isinstance(xindex, BlockIndex): * return block_op_lt_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4043, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4043, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4043, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4044 * if isinstance(xindex, BlockIndex): * return block_op_lt_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_lt_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4044, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4044, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4044, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4043 * * if isinstance(xindex, BlockIndex): * return block_op_lt_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_lt_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4042 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_lt_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4045 * return block_op_lt_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_lt_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":4046 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_lt_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4046, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4046, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4046, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4047 * elif isinstance(xindex, IntIndex): * return int_op_lt_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4047, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4047, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4047, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4046 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_lt_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_lt_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4045 * return block_op_lt_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_lt_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4049 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 4049, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":4037 * * * cpdef sparse_lt_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_lt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_87sparse_lt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_87sparse_lt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_lt_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_lt_int64", 1, 6, 6, 1); __PYX_ERR(2, 4037, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_lt_int64", 1, 6, 6, 2); __PYX_ERR(2, 4037, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_lt_int64", 1, 6, 6, 3); __PYX_ERR(2, 4037, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_lt_int64", 1, 6, 6, 4); __PYX_ERR(2, 4037, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_lt_int64", 1, 6, 6, 5); __PYX_ERR(2, 4037, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_lt_int64") < 0)) __PYX_ERR(2, 4037, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4038, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4040, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_lt_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4037, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_lt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 4037, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 4038, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 4039, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 4040, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_86sparse_lt_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_86sparse_lt_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_lt_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4037, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4037, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_lt_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_lt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4052 * * * cpdef sparse_fill_lt_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill < yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_89sparse_fill_lt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_lt_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_lt_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":4054 * cpdef sparse_fill_lt_int64(int64_t xfill, * int64_t yfill): * return xfill < yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill < __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4052 * * * cpdef sparse_fill_lt_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill < yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_lt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_89sparse_fill_lt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_89sparse_fill_lt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_lt_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_lt_int64", 1, 2, 2, 1); __PYX_ERR(2, 4052, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_lt_int64") < 0)) __PYX_ERR(2, 4052, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4052, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4053, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_lt_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4052, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_lt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_88sparse_fill_lt_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_88sparse_fill_lt_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_lt_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_lt_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_lt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4059 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_gt_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_gt_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_gt_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4071 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4072 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4074 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":4080 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4080, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4081 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4081, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4083 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4084 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4084, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4084, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4084, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4089 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4090 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4092 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] > yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) > __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4093 * # use y fill value * out[out_i] = x[xi] > yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4096 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4097 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4098 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4099 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4097 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4100 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4090 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4102 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill > y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4104 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill > y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4105 * # use x fill value * out[out_i] = xfill > y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4108 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4109 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4110 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4111 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4109 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4112 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4102 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill > y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4114 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":4115 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":4118 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] > y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4119 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] > y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4120 * if xloc == yloc: * out[out_i] = x[xi] > y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4121 * out[out_i] = x[xi] > y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4124 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4125 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4126 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4127 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4125 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4129 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4130 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4131 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4132 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4130 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4118 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] > y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":4134 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4136 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] > yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) > __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4137 * # use y fill value * out[out_i] = x[xi] > yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4140 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4141 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4142 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4143 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4141 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4134 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":4146 * else: * # use x fill value * out[out_i] = xfill > y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4147 * # use x fill value * out[out_i] = xfill > y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4150 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4151 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4152 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4153 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill > yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4151 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4155 * ybp = 0 * * return out, out_index, xfill > yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill > __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4059 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_gt_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_gt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4160 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_gt_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_gt_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_gt_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4166 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4173 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4173, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4174 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4174, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4177 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4178 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4178, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4178, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4180 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4180, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4181 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4181, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4182 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4182, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4185 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4186 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill > y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4188 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill > y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4189 * # use x fill value * out[out_i] = xfill > y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4190 * out[out_i] = xfill > y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4186 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill > y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4192 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4194 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] > yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) > __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4195 * # use y fill value * out[out_i] = x[xi] > yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4196 * out[out_i] = x[xi] > yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4192 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4198 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4199 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4202 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] > y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4203 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] > y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4204 * if xloc == yloc: * out[out_i] = x[xi] > y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4205 * out[out_i] = x[xi] > y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4202 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] > y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4206 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4208 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] > yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) > __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4209 * # use y fill value * out[out_i] = x[xi] > yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4206 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4212 * else: * # use x fill value * out[out_i] = xfill > y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4213 * # use x fill value * out[out_i] = xfill > y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill > yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4215 * yi += 1 * * return out, out_index, xfill > yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill > __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4160 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_gt_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_gt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4218 * * * cpdef sparse_gt_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_91sparse_gt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_gt_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_gt_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4218, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4218, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":4223 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_gt_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":4224 * * if isinstance(xindex, BlockIndex): * return block_op_gt_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4224, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4224, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4225 * if isinstance(xindex, BlockIndex): * return block_op_gt_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_gt_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4225, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4225, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4224 * * if isinstance(xindex, BlockIndex): * return block_op_gt_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_gt_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4223 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_gt_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4226 * return block_op_gt_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_gt_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":4227 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_gt_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4227, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4227, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4228 * elif isinstance(xindex, IntIndex): * return int_op_gt_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4228, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4228, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4228, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4227 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_gt_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_gt_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4226 * return block_op_gt_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_gt_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4230 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 4230, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":4218 * * * cpdef sparse_gt_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_gt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_91sparse_gt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_91sparse_gt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_gt_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_gt_float64", 1, 6, 6, 1); __PYX_ERR(2, 4218, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_gt_float64", 1, 6, 6, 2); __PYX_ERR(2, 4218, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_gt_float64", 1, 6, 6, 3); __PYX_ERR(2, 4218, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_gt_float64", 1, 6, 6, 4); __PYX_ERR(2, 4218, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_gt_float64", 1, 6, 6, 5); __PYX_ERR(2, 4218, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_gt_float64") < 0)) __PYX_ERR(2, 4218, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4219, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4221, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_gt_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4218, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_gt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 4218, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 4219, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 4220, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 4221, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_90sparse_gt_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_90sparse_gt_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_gt_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4218, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4218, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_gt_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_gt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4233 * * * cpdef sparse_fill_gt_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill > yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_93sparse_fill_gt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_gt_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_gt_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":4235 * cpdef sparse_fill_gt_float64(float64_t xfill, * float64_t yfill): * return xfill > yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill > __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4233 * * * cpdef sparse_fill_gt_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill > yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_gt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_93sparse_fill_gt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_93sparse_fill_gt_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_gt_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_gt_float64", 1, 2, 2, 1); __PYX_ERR(2, 4233, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_gt_float64") < 0)) __PYX_ERR(2, 4233, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4233, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4234, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_gt_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4233, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_gt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_92sparse_fill_gt_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_92sparse_fill_gt_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_gt_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_gt_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_gt_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4240 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_gt_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_gt_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_gt_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4252 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4253 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4255 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":4261 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4261, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4262 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4262, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4264 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4265 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4265, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4265, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4265, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4270 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4271 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4273 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] > yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) > __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4274 * # use y fill value * out[out_i] = x[xi] > yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4277 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4278 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4279 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4280 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4278 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4281 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4271 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4283 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill > y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4285 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill > y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4286 * # use x fill value * out[out_i] = xfill > y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4289 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4290 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4291 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4292 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4290 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4293 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4283 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill > y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4295 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":4296 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":4299 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] > y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4300 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] > y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4301 * if xloc == yloc: * out[out_i] = x[xi] > y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4302 * out[out_i] = x[xi] > y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4305 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4306 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4307 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4308 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4306 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4310 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4311 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4312 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4313 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4311 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4299 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] > y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":4315 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4317 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] > yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) > __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4318 * # use y fill value * out[out_i] = x[xi] > yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4321 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4322 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4323 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4324 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4322 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4315 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":4327 * else: * # use x fill value * out[out_i] = xfill > y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4328 * # use x fill value * out[out_i] = xfill > y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4331 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4332 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4333 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4334 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill > yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4332 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4336 * ybp = 0 * * return out, out_index, xfill > yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill > __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4240 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_gt_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_gt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4341 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_gt_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_gt_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_gt_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4347 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4354 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4354, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4355 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4355, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4358 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4359 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4359, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4359, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4361 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4361, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4362 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4362, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4363 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4363, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4366 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4367 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill > y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4369 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill > y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4370 * # use x fill value * out[out_i] = xfill > y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4371 * out[out_i] = xfill > y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4367 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill > y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4373 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4375 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] > yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) > __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4376 * # use y fill value * out[out_i] = x[xi] > yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4377 * out[out_i] = x[xi] > yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4373 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4379 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4380 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4383 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] > y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4384 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] > y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4385 * if xloc == yloc: * out[out_i] = x[xi] > y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4386 * out[out_i] = x[xi] > y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4383 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] > y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4387 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4389 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] > yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) > __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4390 * # use y fill value * out[out_i] = x[xi] > yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4387 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] > yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4393 * else: * # use x fill value * out[out_i] = xfill > y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4394 * # use x fill value * out[out_i] = xfill > y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill > yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4396 * yi += 1 * * return out, out_index, xfill > yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill > __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4341 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_gt_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_gt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4399 * * * cpdef sparse_gt_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_95sparse_gt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_gt_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_gt_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4399, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4399, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":4404 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_gt_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":4405 * * if isinstance(xindex, BlockIndex): * return block_op_gt_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4405, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4405, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4405, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4406 * if isinstance(xindex, BlockIndex): * return block_op_gt_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_gt_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4406, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4406, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4405 * * if isinstance(xindex, BlockIndex): * return block_op_gt_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_gt_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4404 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_gt_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4407 * return block_op_gt_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_gt_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":4408 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_gt_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4408, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4408, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4408, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4409 * elif isinstance(xindex, IntIndex): * return int_op_gt_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4409, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4409, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4408 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_gt_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_gt_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4407 * return block_op_gt_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_gt_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4411 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 4411, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":4399 * * * cpdef sparse_gt_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_gt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_95sparse_gt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_95sparse_gt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_gt_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_gt_int64", 1, 6, 6, 1); __PYX_ERR(2, 4399, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_gt_int64", 1, 6, 6, 2); __PYX_ERR(2, 4399, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_gt_int64", 1, 6, 6, 3); __PYX_ERR(2, 4399, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_gt_int64", 1, 6, 6, 4); __PYX_ERR(2, 4399, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_gt_int64", 1, 6, 6, 5); __PYX_ERR(2, 4399, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_gt_int64") < 0)) __PYX_ERR(2, 4399, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4400, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4402, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_gt_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4399, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_gt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 4399, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 4400, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 4401, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 4402, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_94sparse_gt_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_94sparse_gt_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_gt_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4399, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4399, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_gt_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_gt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4414 * * * cpdef sparse_fill_gt_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill > yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_97sparse_fill_gt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_gt_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_gt_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":4416 * cpdef sparse_fill_gt_int64(int64_t xfill, * int64_t yfill): * return xfill > yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill > __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4414 * * * cpdef sparse_fill_gt_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill > yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_gt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_97sparse_fill_gt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_97sparse_fill_gt_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_gt_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_gt_int64", 1, 2, 2, 1); __PYX_ERR(2, 4414, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_gt_int64") < 0)) __PYX_ERR(2, 4414, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4414, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4415, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_gt_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4414, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_gt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_96sparse_fill_gt_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_96sparse_fill_gt_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_gt_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_gt_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_gt_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4421 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_le_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_le_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_le_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4433 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4434 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4436 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":4442 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4442, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4443 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4443, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4445 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4446 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4446, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4446, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4446, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4451 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4452 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4454 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] <= yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) <= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4455 * # use y fill value * out[out_i] = x[xi] <= yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4458 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4459 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4460 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4461 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4459 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4462 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4452 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4464 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill <= y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4466 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill <= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4467 * # use x fill value * out[out_i] = xfill <= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4470 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4471 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4472 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4473 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4471 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4474 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4464 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill <= y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4476 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":4477 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":4480 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] <= y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4481 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] <= y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4482 * if xloc == yloc: * out[out_i] = x[xi] <= y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4483 * out[out_i] = x[xi] <= y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4486 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4487 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4488 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4489 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4487 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4491 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4492 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4493 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4494 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4492 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4480 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] <= y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":4496 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4498 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] <= yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) <= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4499 * # use y fill value * out[out_i] = x[xi] <= yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4502 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4503 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4504 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4505 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4503 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4496 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":4508 * else: * # use x fill value * out[out_i] = xfill <= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4509 * # use x fill value * out[out_i] = xfill <= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4512 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4513 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4514 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4515 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill <= yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4513 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4517 * ybp = 0 * * return out, out_index, xfill <= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill <= __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4421 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_le_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_le_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4522 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_le_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_le_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_le_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4528 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4535 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4535, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4536 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4536, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4539 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4540 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4540, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4540, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4542 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4542, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4543 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4543, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4544 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4544, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4547 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4548 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill <= y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4550 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill <= y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4551 * # use x fill value * out[out_i] = xfill <= y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4552 * out[out_i] = xfill <= y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4548 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill <= y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4554 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4556 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] <= yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) <= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4557 * # use y fill value * out[out_i] = x[xi] <= yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4558 * out[out_i] = x[xi] <= yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4554 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4560 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4561 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4564 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] <= y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4565 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] <= y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4566 * if xloc == yloc: * out[out_i] = x[xi] <= y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4567 * out[out_i] = x[xi] <= y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4564 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] <= y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4568 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4570 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] <= yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) <= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4571 * # use y fill value * out[out_i] = x[xi] <= yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4568 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4574 * else: * # use x fill value * out[out_i] = xfill <= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4575 * # use x fill value * out[out_i] = xfill <= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill <= yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4577 * yi += 1 * * return out, out_index, xfill <= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill <= __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4522 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_le_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_le_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4580 * * * cpdef sparse_le_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_99sparse_le_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_le_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_le_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4580, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4580, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":4585 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_le_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":4586 * * if isinstance(xindex, BlockIndex): * return block_op_le_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4586, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4586, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4586, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4587 * if isinstance(xindex, BlockIndex): * return block_op_le_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_le_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4587, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4587, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4587, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4586 * * if isinstance(xindex, BlockIndex): * return block_op_le_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_le_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4585 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_le_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4588 * return block_op_le_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_le_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":4589 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_le_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4589, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4589, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4589, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4590 * elif isinstance(xindex, IntIndex): * return int_op_le_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4590, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4590, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4589 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_le_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_le_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4588 * return block_op_le_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_le_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4592 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 4592, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":4580 * * * cpdef sparse_le_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_le_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_99sparse_le_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_99sparse_le_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_le_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_le_float64", 1, 6, 6, 1); __PYX_ERR(2, 4580, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_le_float64", 1, 6, 6, 2); __PYX_ERR(2, 4580, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_le_float64", 1, 6, 6, 3); __PYX_ERR(2, 4580, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_le_float64", 1, 6, 6, 4); __PYX_ERR(2, 4580, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_le_float64", 1, 6, 6, 5); __PYX_ERR(2, 4580, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_le_float64") < 0)) __PYX_ERR(2, 4580, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4581, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4583, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_le_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4580, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_le_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 4580, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 4581, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 4582, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 4583, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_98sparse_le_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_98sparse_le_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_le_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4580, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4580, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_le_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_le_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4595 * * * cpdef sparse_fill_le_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill <= yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_101sparse_fill_le_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_le_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_le_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":4597 * cpdef sparse_fill_le_float64(float64_t xfill, * float64_t yfill): * return xfill <= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill <= __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4595 * * * cpdef sparse_fill_le_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill <= yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_le_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_101sparse_fill_le_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_101sparse_fill_le_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_le_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_le_float64", 1, 2, 2, 1); __PYX_ERR(2, 4595, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_le_float64") < 0)) __PYX_ERR(2, 4595, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4595, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4596, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_le_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4595, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_le_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_100sparse_fill_le_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_100sparse_fill_le_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_le_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_le_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_le_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4602 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_le_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_le_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_le_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4614 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4615 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4617 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":4623 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4623, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4624 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4624, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4626 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4627 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4627, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4627, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4627, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4632 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4633 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4635 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] <= yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) <= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4636 * # use y fill value * out[out_i] = x[xi] <= yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4639 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4640 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4641 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4642 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4640 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4643 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4633 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4645 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill <= y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4647 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill <= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4648 * # use x fill value * out[out_i] = xfill <= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4651 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4652 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4653 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4654 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4652 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4655 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4645 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill <= y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4657 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":4658 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":4661 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] <= y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4662 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] <= y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4663 * if xloc == yloc: * out[out_i] = x[xi] <= y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4664 * out[out_i] = x[xi] <= y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4667 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4668 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4669 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4670 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4668 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4672 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4673 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4674 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4675 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4673 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4661 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] <= y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":4677 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4679 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] <= yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) <= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4680 * # use y fill value * out[out_i] = x[xi] <= yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4683 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4684 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4685 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4686 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4684 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4677 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":4689 * else: * # use x fill value * out[out_i] = xfill <= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4690 * # use x fill value * out[out_i] = xfill <= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4693 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4694 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4695 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4696 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill <= yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4694 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4698 * ybp = 0 * * return out, out_index, xfill <= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill <= __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4602 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_le_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_le_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4703 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_le_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_le_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_le_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4709 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4716 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4716, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4717 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4717, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4720 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4721 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4721, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4721, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4721, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4723 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4723, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4724 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4724, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4725 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4725, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4728 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4729 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill <= y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4731 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill <= y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4732 * # use x fill value * out[out_i] = xfill <= y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4733 * out[out_i] = xfill <= y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4729 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill <= y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4735 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4737 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] <= yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) <= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4738 * # use y fill value * out[out_i] = x[xi] <= yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4739 * out[out_i] = x[xi] <= yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4735 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4741 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4742 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4745 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] <= y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4746 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] <= y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4747 * if xloc == yloc: * out[out_i] = x[xi] <= y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4748 * out[out_i] = x[xi] <= y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4745 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] <= y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4749 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4751 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] <= yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) <= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4752 * # use y fill value * out[out_i] = x[xi] <= yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4749 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] <= yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4755 * else: * # use x fill value * out[out_i] = xfill <= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4756 * # use x fill value * out[out_i] = xfill <= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill <= yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4758 * yi += 1 * * return out, out_index, xfill <= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill <= __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4703 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_le_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_le_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4761 * * * cpdef sparse_le_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_103sparse_le_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_le_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_le_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4761, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4761, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":4766 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_le_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":4767 * * if isinstance(xindex, BlockIndex): * return block_op_le_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4767, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4767, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4767, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4768 * if isinstance(xindex, BlockIndex): * return block_op_le_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_le_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4768, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4768, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4768, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4767 * * if isinstance(xindex, BlockIndex): * return block_op_le_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_le_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4766 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_le_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4769 * return block_op_le_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_le_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":4770 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_le_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4770, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4770, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4770, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4771 * elif isinstance(xindex, IntIndex): * return int_op_le_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4771, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4771, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4771, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4770 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_le_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_le_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4769 * return block_op_le_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_le_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4773 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 4773, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":4761 * * * cpdef sparse_le_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_le_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_103sparse_le_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_103sparse_le_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_le_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_le_int64", 1, 6, 6, 1); __PYX_ERR(2, 4761, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_le_int64", 1, 6, 6, 2); __PYX_ERR(2, 4761, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_le_int64", 1, 6, 6, 3); __PYX_ERR(2, 4761, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_le_int64", 1, 6, 6, 4); __PYX_ERR(2, 4761, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_le_int64", 1, 6, 6, 5); __PYX_ERR(2, 4761, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_le_int64") < 0)) __PYX_ERR(2, 4761, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4762, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4764, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_le_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4761, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_le_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 4761, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 4762, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 4763, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 4764, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_102sparse_le_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_102sparse_le_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_le_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4761, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4761, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_le_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_le_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4776 * * * cpdef sparse_fill_le_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill <= yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_105sparse_fill_le_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_le_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_le_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":4778 * cpdef sparse_fill_le_int64(int64_t xfill, * int64_t yfill): * return xfill <= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill <= __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4776 * * * cpdef sparse_fill_le_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill <= yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_le_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_105sparse_fill_le_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_105sparse_fill_le_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_le_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_le_int64", 1, 2, 2, 1); __PYX_ERR(2, 4776, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_le_int64") < 0)) __PYX_ERR(2, 4776, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4776, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4777, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_le_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4776, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_le_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_104sparse_fill_le_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_104sparse_fill_le_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_le_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_le_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_le_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4783 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_ge_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_ge_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_ge_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4795 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4796 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4798 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[float64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":4804 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4804, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4805 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4805, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4807 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4808 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4808, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4808, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4808, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4813 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4814 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4816 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] >= yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) >= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4817 * # use y fill value * out[out_i] = x[xi] >= yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4820 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4821 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4822 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4823 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4821 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4824 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4814 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4826 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill >= y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4828 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill >= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4829 * # use x fill value * out[out_i] = xfill >= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4832 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4833 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4834 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4835 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4833 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4836 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4826 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill >= y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4838 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":4839 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":4842 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] >= y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4843 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] >= y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4844 * if xloc == yloc: * out[out_i] = x[xi] >= y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4845 * out[out_i] = x[xi] >= y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4848 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4849 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4850 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4851 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4849 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4853 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4854 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4855 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4856 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4854 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4842 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] >= y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":4858 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4860 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] >= yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) >= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4861 * # use y fill value * out[out_i] = x[xi] >= yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4864 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4865 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4866 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4867 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4865 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":4858 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":4870 * else: * # use x fill value * out[out_i] = xfill >= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4871 * # use x fill value * out[out_i] = xfill >= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4874 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":4875 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4876 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":4877 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill >= yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4875 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4879 * ybp = 0 * * return out, out_index, xfill >= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill >= __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4783 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_ge_float64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * float64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_ge_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4884 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_ge_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_ge_float64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_ge_float64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4890 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4897 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4897, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4898 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4898, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4901 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4902 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4902, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4902, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4902, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4904 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4904, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4905 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4905, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4906 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4906, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4909 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4910 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill >= y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4912 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill >= y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4913 * # use x fill value * out[out_i] = xfill >= y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4914 * out[out_i] = xfill >= y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4910 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill >= y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":4916 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4918 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] >= yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) >= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4919 * # use y fill value * out[out_i] = x[xi] >= yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4920 * out[out_i] = x[xi] >= yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4916 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":4922 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4923 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":4926 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] >= y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4927 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] >= y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4928 * if xloc == yloc: * out[out_i] = x[xi] >= y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4929 * out[out_i] = x[xi] >= y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4926 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] >= y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4930 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4932 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] >= yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) >= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4933 * # use y fill value * out[out_i] = x[xi] >= yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":4930 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":4936 * else: * # use x fill value * out[out_i] = xfill >= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":4937 * # use x fill value * out[out_i] = xfill >= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill >= yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":4939 * yi += 1 * * return out, out_index, xfill >= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill >= __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4884 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_ge_float64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * float64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_ge_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4942 * * * cpdef sparse_ge_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_107sparse_ge_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_ge_float64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_ge_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4942, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4942, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":4947 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_ge_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":4948 * * if isinstance(xindex, BlockIndex): * return block_op_ge_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4948, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4948, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4948, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4949 * if isinstance(xindex, BlockIndex): * return block_op_ge_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_ge_float64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4949, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4949, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 4949, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4948 * * if isinstance(xindex, BlockIndex): * return block_op_ge_float64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_ge_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4947 * SparseIndex yindex, float64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_ge_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4950 * return block_op_ge_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_ge_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":4951 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_ge_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4951, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4951, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4951, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4952 * elif isinstance(xindex, IntIndex): * return int_op_ge_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4952, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4952, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 4952, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":4951 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_ge_float64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_ge_float64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4950 * return block_op_ge_float64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_ge_float64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":4954 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 4954, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":4942 * * * cpdef sparse_ge_float64(ndarray[float64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, float64_t xfill, * ndarray[float64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_ge_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_107sparse_ge_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_107sparse_ge_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_float64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_ge_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ge_float64", 1, 6, 6, 1); __PYX_ERR(2, 4942, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ge_float64", 1, 6, 6, 2); __PYX_ERR(2, 4942, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ge_float64", 1, 6, 6, 3); __PYX_ERR(2, 4942, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ge_float64", 1, 6, 6, 4); __PYX_ERR(2, 4942, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ge_float64", 1, 6, 6, 5); __PYX_ERR(2, 4942, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_ge_float64") < 0)) __PYX_ERR(2, 4942, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4943, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4945, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_ge_float64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4942, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_ge_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 4942, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 4943, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 4944, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 4945, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_106sparse_ge_float64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_106sparse_ge_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_float64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_float64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_ge_float64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4942, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 4942, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_ge_float64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_ge_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4957 * * * cpdef sparse_fill_ge_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill >= yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_109sparse_fill_ge_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_ge_float64(__pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_ge_float64", 0); /* "pandas/_libs/sparse_op_helper.pxi":4959 * cpdef sparse_fill_ge_float64(float64_t xfill, * float64_t yfill): * return xfill >= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill >= __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4957 * * * cpdef sparse_fill_ge_float64(float64_t xfill, # <<<<<<<<<<<<<< * float64_t yfill): * return xfill >= yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ge_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_109sparse_fill_ge_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_109sparse_fill_ge_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_float64_t __pyx_v_xfill; __pyx_t_5numpy_float64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_ge_float64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_ge_float64", 1, 2, 2, 1); __PYX_ERR(2, 4957, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_ge_float64") < 0)) __PYX_ERR(2, 4957, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_xfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4957, __pyx_L3_error) __pyx_v_yfill = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_yfill == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 4958, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_ge_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 4957, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ge_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_108sparse_fill_ge_float64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_108sparse_fill_ge_float64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_xfill, __pyx_t_5numpy_float64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_ge_float64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_ge_float64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ge_float64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":4964 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_ge_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_ge_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_ge_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":4976 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":4977 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":4979 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":4985 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4985, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":4986 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4986, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":4988 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4989 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 4989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 4989, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 4989, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 4989, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":4994 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":4995 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":4997 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] >= yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) >= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":4998 * # use y fill value * out[out_i] = x[xi] >= yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5001 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5002 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5003 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5004 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5002 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5005 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":4995 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":5007 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill >= y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5009 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill >= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5010 * # use x fill value * out[out_i] = xfill >= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5013 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5014 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5015 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5016 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5014 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5017 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5007 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill >= y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":5019 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":5020 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":5023 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] >= y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5024 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] >= y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5025 * if xloc == yloc: * out[out_i] = x[xi] >= y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5026 * out[out_i] = x[xi] >= y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5029 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5030 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5031 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5032 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5030 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5034 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5035 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5036 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5037 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5035 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5023 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] >= y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":5039 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5041 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] >= yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) >= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5042 * # use y fill value * out[out_i] = x[xi] >= yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5045 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5046 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5047 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5048 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5046 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5039 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":5051 * else: * # use x fill value * out[out_i] = xfill >= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5052 * # use x fill value * out[out_i] = xfill >= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5055 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5056 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5057 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5058 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill >= yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5056 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":5060 * ybp = 0 * * return out, out_index, xfill >= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill >= __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":4964 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_ge_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_ge_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5065 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_ge_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_ge_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_ge_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":5071 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":5078 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5078, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":5079 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5079, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":5082 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5083 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 5083, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 5083, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5083, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5085 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5085, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5086 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5086, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5087 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5087, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5090 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":5091 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill >= y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5093 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill >= y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5094 * # use x fill value * out[out_i] = xfill >= y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5095 * out[out_i] = xfill >= y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5091 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill >= y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":5097 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5099 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] >= yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) >= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5100 * # use y fill value * out[out_i] = x[xi] >= yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5101 * out[out_i] = x[xi] >= yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5097 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":5103 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":5104 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":5107 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] >= y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5108 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] >= y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5109 * if xloc == yloc: * out[out_i] = x[xi] >= y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5110 * out[out_i] = x[xi] >= y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5107 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] >= y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":5111 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5113 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] >= yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) >= __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5114 * # use y fill value * out[out_i] = x[xi] >= yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5111 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] >= yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":5117 * else: * # use x fill value * out[out_i] = xfill >= y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill >= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5118 * # use x fill value * out[out_i] = xfill >= y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill >= yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":5120 * yi += 1 * * return out, out_index, xfill >= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_xfill >= __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5065 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_ge_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_ge_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5123 * * * cpdef sparse_ge_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_111sparse_ge_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_ge_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_ge_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5123, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5123, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":5128 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_ge_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":5129 * * if isinstance(xindex, BlockIndex): * return block_op_ge_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5129, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 5129, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5130 * if isinstance(xindex, BlockIndex): * return block_op_ge_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_ge_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5130, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 5130, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5129 * * if isinstance(xindex, BlockIndex): * return block_op_ge_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_ge_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5128 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_ge_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":5131 * return block_op_ge_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_ge_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":5132 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_ge_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5132, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 5132, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5133 * elif isinstance(xindex, IntIndex): * return int_op_ge_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5133, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 5133, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5132 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_ge_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_ge_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5131 * return block_op_ge_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_ge_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":5135 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 5135, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":5123 * * * cpdef sparse_ge_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_ge_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_111sparse_ge_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_111sparse_ge_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_ge_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ge_int64", 1, 6, 6, 1); __PYX_ERR(2, 5123, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ge_int64", 1, 6, 6, 2); __PYX_ERR(2, 5123, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ge_int64", 1, 6, 6, 3); __PYX_ERR(2, 5123, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ge_int64", 1, 6, 6, 4); __PYX_ERR(2, 5123, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_ge_int64", 1, 6, 6, 5); __PYX_ERR(2, 5123, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_ge_int64") < 0)) __PYX_ERR(2, 5123, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5124, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5126, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_ge_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5123, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_ge_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 5123, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 5124, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 5125, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 5126, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_110sparse_ge_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_110sparse_ge_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_ge_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5123, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5123, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_ge_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_ge_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5138 * * * cpdef sparse_fill_ge_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill >= yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_113sparse_fill_ge_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_ge_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_ge_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":5140 * cpdef sparse_fill_ge_int64(int64_t xfill, * int64_t yfill): * return xfill >= yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_xfill >= __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5138 * * * cpdef sparse_fill_ge_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill >= yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ge_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_113sparse_fill_ge_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_113sparse_fill_ge_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_ge_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_ge_int64", 1, 2, 2, 1); __PYX_ERR(2, 5138, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_ge_int64") < 0)) __PYX_ERR(2, 5138, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5138, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5139, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_ge_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5138, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ge_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_112sparse_fill_ge_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_112sparse_fill_ge_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_ge_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_ge_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_ge_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5145 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_and_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_and_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_and_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":5157 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":5158 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5160 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":5166 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5166, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":5167 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5167, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":5169 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5170 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 5170, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 5170, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5170, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5175 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":5176 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5178 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] & yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) & __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5179 * # use y fill value * out[out_i] = x[xi] & yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5182 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5183 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5184 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5185 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5183 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5186 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5176 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":5188 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill & y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5190 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill & y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5191 * # use x fill value * out[out_i] = xfill & y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5194 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5195 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5196 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5197 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5195 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5198 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5188 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill & y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":5200 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":5201 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":5204 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] & y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5205 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] & y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5206 * if xloc == yloc: * out[out_i] = x[xi] & y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5207 * out[out_i] = x[xi] & y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5210 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5211 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5212 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5213 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5211 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5215 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5216 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5217 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5218 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5216 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5204 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] & y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":5220 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5222 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] & yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) & __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5223 * # use y fill value * out[out_i] = x[xi] & yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5226 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5227 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5228 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5229 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5227 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5220 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":5232 * else: * # use x fill value * out[out_i] = xfill & y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5233 * # use x fill value * out[out_i] = xfill & y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5236 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5237 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5238 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5239 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill & yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5237 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":5241 * ybp = 0 * * return out, out_index, xfill & yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill & __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5145 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_and_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_and_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5246 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_and_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_and_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_and_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":5252 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":5259 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5259, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":5260 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5260, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":5263 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5264 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 5264, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 5264, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5264, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5266 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5266, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5267 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5267, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5268 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5268, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5271 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":5272 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill & y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5274 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill & y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5275 * # use x fill value * out[out_i] = xfill & y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5276 * out[out_i] = xfill & y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5272 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill & y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":5278 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5280 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] & yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) & __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5281 * # use y fill value * out[out_i] = x[xi] & yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5282 * out[out_i] = x[xi] & yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5278 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":5284 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":5285 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":5288 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] & y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5289 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] & y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5290 * if xloc == yloc: * out[out_i] = x[xi] & y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5291 * out[out_i] = x[xi] & y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5288 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] & y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":5292 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5294 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] & yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) & __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5295 * # use y fill value * out[out_i] = x[xi] & yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5292 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":5298 * else: * # use x fill value * out[out_i] = xfill & y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5299 * # use x fill value * out[out_i] = xfill & y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill & yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":5301 * yi += 1 * * return out, out_index, xfill & yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill & __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5246 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_and_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_and_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5304 * * * cpdef sparse_and_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_115sparse_and_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_and_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_and_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5304, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5304, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":5309 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_and_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":5310 * * if isinstance(xindex, BlockIndex): * return block_op_and_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5310, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 5310, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5311 * if isinstance(xindex, BlockIndex): * return block_op_and_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_and_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5311, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 5311, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5310 * * if isinstance(xindex, BlockIndex): * return block_op_and_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_and_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5309 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_and_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":5312 * return block_op_and_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_and_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":5313 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_and_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5313, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5313, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 5313, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5314 * elif isinstance(xindex, IntIndex): * return int_op_and_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5314, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 5314, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5313 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_and_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_and_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5312 * return block_op_and_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_and_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":5316 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 5316, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":5304 * * * cpdef sparse_and_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_and_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_115sparse_and_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_115sparse_and_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_and_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_and_int64", 1, 6, 6, 1); __PYX_ERR(2, 5304, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_and_int64", 1, 6, 6, 2); __PYX_ERR(2, 5304, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_and_int64", 1, 6, 6, 3); __PYX_ERR(2, 5304, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_and_int64", 1, 6, 6, 4); __PYX_ERR(2, 5304, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_and_int64", 1, 6, 6, 5); __PYX_ERR(2, 5304, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_and_int64") < 0)) __PYX_ERR(2, 5304, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5305, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5307, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_and_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5304, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_and_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 5304, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 5305, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 5306, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 5307, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_114sparse_and_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_114sparse_and_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_and_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5304, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5304, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_and_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_and_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5319 * * * cpdef sparse_fill_and_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill & yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_117sparse_fill_and_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_and_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_and_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":5321 * cpdef sparse_fill_and_int64(int64_t xfill, * int64_t yfill): * return xfill & yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill & __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5319 * * * cpdef sparse_fill_and_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill & yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_and_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_117sparse_fill_and_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_117sparse_fill_and_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_and_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_and_int64", 1, 2, 2, 1); __PYX_ERR(2, 5319, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_and_int64") < 0)) __PYX_ERR(2, 5319, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5319, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5320, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_and_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5319, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_and_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_116sparse_fill_and_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_116sparse_fill_and_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_and_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_and_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_and_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5326 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_and_uint8(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * uint8_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_and_uint8(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_uint8_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_uint8_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_and_uint8", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":5338 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":5339 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5341 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[uint8_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":5347 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5347, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":5348 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5348, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":5350 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5351 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 5351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 5351, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5351, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5356 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":5357 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5359 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] & yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) & __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5360 * # use y fill value * out[out_i] = x[xi] & yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5363 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5364 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5365 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5366 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5364 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5367 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5357 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":5369 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill & y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5371 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill & y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5372 * # use x fill value * out[out_i] = xfill & y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5375 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5376 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5377 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5378 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5376 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5379 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5369 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill & y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":5381 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":5382 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":5385 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] & y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5386 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] & y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5387 * if xloc == yloc: * out[out_i] = x[xi] & y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5388 * out[out_i] = x[xi] & y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5391 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5392 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5393 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5394 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5392 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5396 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5397 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5398 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5399 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5397 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5385 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] & y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":5401 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5403 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] & yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) & __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5404 * # use y fill value * out[out_i] = x[xi] & yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5407 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5408 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5409 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5410 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5408 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5401 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":5413 * else: * # use x fill value * out[out_i] = xfill & y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5414 * # use x fill value * out[out_i] = xfill & y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5417 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5418 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5419 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5420 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill & yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5418 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":5422 * ybp = 0 * * return out, out_index, xfill & yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_xfill & __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5326 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_and_uint8(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * uint8_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_and_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5427 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_and_uint8(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * uint8_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_and_uint8(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_uint8_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_uint8_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_and_uint8", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":5433 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":5440 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5440, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":5441 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5441, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":5444 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5445 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 5445, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 5445, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5445, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5447 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5447, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5448 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5448, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5449 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5449, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5452 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":5453 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill & y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5455 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill & y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5456 * # use x fill value * out[out_i] = xfill & y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5457 * out[out_i] = xfill & y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5453 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill & y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":5459 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5461 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] & yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) & __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5462 * # use y fill value * out[out_i] = x[xi] & yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5463 * out[out_i] = x[xi] & yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5459 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":5465 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":5466 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":5469 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] & y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5470 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] & y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5471 * if xloc == yloc: * out[out_i] = x[xi] & y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5472 * out[out_i] = x[xi] & y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5469 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] & y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":5473 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5475 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] & yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) & __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5476 * # use y fill value * out[out_i] = x[xi] & yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5473 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] & yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":5479 * else: * # use x fill value * out[out_i] = xfill & y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill & (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5480 * # use x fill value * out[out_i] = xfill & y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill & yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":5482 * yi += 1 * * return out, out_index, xfill & yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_xfill & __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5427 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_and_uint8(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * uint8_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_and_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5485 * * * cpdef sparse_and_uint8(ndarray[uint8_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, uint8_t xfill, * ndarray[uint8_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_119sparse_and_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_and_uint8(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_uint8_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_uint8_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_and_uint8", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5485, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5485, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":5490 * SparseIndex yindex, uint8_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_and_uint8(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":5491 * * if isinstance(xindex, BlockIndex): * return block_op_and_uint8(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5491, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5491, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 5491, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5492 * if isinstance(xindex, BlockIndex): * return block_op_and_uint8(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_and_uint8(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5492, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5492, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 5492, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5491 * * if isinstance(xindex, BlockIndex): * return block_op_and_uint8(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_and_uint8(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5490 * SparseIndex yindex, uint8_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_and_uint8(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":5493 * return block_op_and_uint8(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_and_uint8(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":5494 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_and_uint8(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5494, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5494, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 5494, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5495 * elif isinstance(xindex, IntIndex): * return int_op_and_uint8(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5495, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5495, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 5495, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5494 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_and_uint8(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_and_uint8(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5493 * return block_op_and_uint8(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_and_uint8(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":5497 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 5497, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":5485 * * * cpdef sparse_and_uint8(ndarray[uint8_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, uint8_t xfill, * ndarray[uint8_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_and_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_119sparse_and_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_119sparse_and_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_uint8_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_uint8_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_and_uint8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_and_uint8", 1, 6, 6, 1); __PYX_ERR(2, 5485, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_and_uint8", 1, 6, 6, 2); __PYX_ERR(2, 5485, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_and_uint8", 1, 6, 6, 3); __PYX_ERR(2, 5485, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_and_uint8", 1, 6, 6, 4); __PYX_ERR(2, 5485, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_and_uint8", 1, 6, 6, 5); __PYX_ERR(2, 5485, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_and_uint8") < 0)) __PYX_ERR(2, 5485, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_uint8(values[2]); if (unlikely((__pyx_v_xfill == ((npy_uint8)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5486, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_uint8(values[5]); if (unlikely((__pyx_v_yfill == ((npy_uint8)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5488, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_and_uint8", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5485, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_and_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 5485, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 5486, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 5487, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 5488, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_118sparse_and_uint8(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_118sparse_and_uint8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_uint8_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_uint8_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_and_uint8", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5485, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5485, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_and_uint8(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_and_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5500 * * * cpdef sparse_fill_and_uint8(uint8_t xfill, # <<<<<<<<<<<<<< * uint8_t yfill): * return xfill & yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_121sparse_fill_and_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_and_uint8(__pyx_t_5numpy_uint8_t __pyx_v_xfill, __pyx_t_5numpy_uint8_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_and_uint8", 0); /* "pandas/_libs/sparse_op_helper.pxi":5502 * cpdef sparse_fill_and_uint8(uint8_t xfill, * uint8_t yfill): * return xfill & yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_xfill & __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5500 * * * cpdef sparse_fill_and_uint8(uint8_t xfill, # <<<<<<<<<<<<<< * uint8_t yfill): * return xfill & yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_and_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_121sparse_fill_and_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_121sparse_fill_and_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_uint8_t __pyx_v_xfill; __pyx_t_5numpy_uint8_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_and_uint8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_and_uint8", 1, 2, 2, 1); __PYX_ERR(2, 5500, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_and_uint8") < 0)) __PYX_ERR(2, 5500, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_uint8(values[0]); if (unlikely((__pyx_v_xfill == ((npy_uint8)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5500, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_uint8(values[1]); if (unlikely((__pyx_v_yfill == ((npy_uint8)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5501, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_and_uint8", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5500, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_and_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_120sparse_fill_and_uint8(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_120sparse_fill_and_uint8(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_uint8_t __pyx_v_xfill, __pyx_t_5numpy_uint8_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_and_uint8", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_and_uint8(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_and_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5507 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_or_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_or_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_or_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":5519 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":5520 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5522 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[int64_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":5528 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5528, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":5529 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5529, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":5531 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5532 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 5532, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 5532, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5532, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5537 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":5538 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5540 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] | yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) | __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5541 * # use y fill value * out[out_i] = x[xi] | yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5544 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5545 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5546 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5547 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5545 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5548 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5538 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":5550 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill | y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5552 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill | y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5553 * # use x fill value * out[out_i] = xfill | y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5556 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5557 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5558 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5559 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5557 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5560 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5550 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill | y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":5562 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":5563 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":5566 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] | y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5567 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] | y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5568 * if xloc == yloc: * out[out_i] = x[xi] | y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5569 * out[out_i] = x[xi] | y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5572 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5573 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5574 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5575 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5573 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5577 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5578 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5579 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5580 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5578 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5566 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] | y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":5582 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5584 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] | yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) | __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5585 * # use y fill value * out[out_i] = x[xi] | yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5588 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5589 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5590 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5591 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5589 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5582 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":5594 * else: * # use x fill value * out[out_i] = xfill | y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5595 * # use x fill value * out[out_i] = xfill | y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5598 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5599 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5600 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5601 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill | yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5599 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":5603 * ybp = 0 * * return out, out_index, xfill | yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill | __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5507 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_or_int64(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * int64_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_or_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5608 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_or_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_or_int64(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_or_int64", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":5614 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":5621 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5621, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":5622 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5622, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":5625 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5626 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 5626, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 5626, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5626, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5628 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5628, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5629 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5629, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5630 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5630, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5633 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":5634 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill | y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5636 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill | y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5637 * # use x fill value * out[out_i] = xfill | y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5638 * out[out_i] = xfill | y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5634 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill | y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":5640 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5642 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] | yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) | __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5643 * # use y fill value * out[out_i] = x[xi] | yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5644 * out[out_i] = x[xi] | yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5640 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":5646 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":5647 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":5650 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] | y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5651 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] | y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5652 * if xloc == yloc: * out[out_i] = x[xi] | y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5653 * out[out_i] = x[xi] | y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5650 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] | y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":5654 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5656 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] | yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) | __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5657 * # use y fill value * out[out_i] = x[xi] | yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5654 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":5660 * else: * # use x fill value * out[out_i] = xfill | y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5661 * # use x fill value * out[out_i] = xfill | y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill | yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":5663 * yi += 1 * * return out, out_index, xfill | yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill | __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5608 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_or_int64(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * int64_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_or_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5666 * * * cpdef sparse_or_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_123sparse_or_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_or_int64(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_or_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5666, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5666, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":5671 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_or_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":5672 * * if isinstance(xindex, BlockIndex): * return block_op_or_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5672, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5672, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 5672, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5673 * if isinstance(xindex, BlockIndex): * return block_op_or_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_or_int64(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5673, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5673, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 5673, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5672 * * if isinstance(xindex, BlockIndex): * return block_op_or_int64(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_or_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5671 * SparseIndex yindex, int64_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_or_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":5674 * return block_op_or_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_or_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":5675 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_or_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5675, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5675, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 5675, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5676 * elif isinstance(xindex, IntIndex): * return int_op_or_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5676, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5676, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 5676, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5675 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_or_int64(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_or_int64(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5674 * return block_op_or_int64(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_or_int64(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":5678 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 5678, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":5666 * * * cpdef sparse_or_int64(ndarray[int64_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, int64_t xfill, * ndarray[int64_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_or_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_123sparse_or_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_123sparse_or_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_int64_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_or_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_or_int64", 1, 6, 6, 1); __PYX_ERR(2, 5666, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_or_int64", 1, 6, 6, 2); __PYX_ERR(2, 5666, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_or_int64", 1, 6, 6, 3); __PYX_ERR(2, 5666, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_or_int64", 1, 6, 6, 4); __PYX_ERR(2, 5666, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_or_int64", 1, 6, 6, 5); __PYX_ERR(2, 5666, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_or_int64") < 0)) __PYX_ERR(2, 5666, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[2]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5667, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[5]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5669, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_or_int64", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5666, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_or_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 5666, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 5667, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 5668, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 5669, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_122sparse_or_int64(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_122sparse_or_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_int64_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_int64_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_or_int64", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5666, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5666, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_or_int64(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_or_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5681 * * * cpdef sparse_fill_or_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill | yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_125sparse_fill_or_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_or_int64(__pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_or_int64", 0); /* "pandas/_libs/sparse_op_helper.pxi":5683 * cpdef sparse_fill_or_int64(int64_t xfill, * int64_t yfill): * return xfill | yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_npy_int64((__pyx_v_xfill | __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5681 * * * cpdef sparse_fill_or_int64(int64_t xfill, # <<<<<<<<<<<<<< * int64_t yfill): * return xfill | yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_or_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_125sparse_fill_or_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_125sparse_fill_or_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_int64_t __pyx_v_xfill; __pyx_t_5numpy_int64_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_or_int64 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_or_int64", 1, 2, 2, 1); __PYX_ERR(2, 5681, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_or_int64") < 0)) __PYX_ERR(2, 5681, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_xfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5681, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_yfill == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5682, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_or_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5681, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_or_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_124sparse_fill_or_int64(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_124sparse_fill_or_int64(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_xfill, __pyx_t_5numpy_int64_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_or_int64", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_or_int64(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_or_int64", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5688 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_or_uint8(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * uint8_t xfill, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_block_op_or_uint8(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_xindex, __pyx_t_5numpy_uint8_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_yindex, __pyx_t_5numpy_uint8_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xbp; __pyx_t_5numpy_int32_t __pyx_v_ybp; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; Py_ssize_t __pyx_v_xblock; Py_ssize_t __pyx_v_yblock; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; __pyx_t_5numpy_int32_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; __Pyx_RefNannySetupContext("block_op_or_uint8", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":5700 * cdef: * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":5701 * BlockIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices * int32_t xbp = 0, ybp = 0 # block positions # <<<<<<<<<<<<<< * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers */ __pyx_v_xbp = 0; __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5703 * int32_t xbp = 0, ybp = 0 # block positions * int32_t xloc, yloc * Py_ssize_t xblock = 0, yblock = 0 # block numbers # <<<<<<<<<<<<<< * * ndarray[uint8_t, ndim=1] x, y */ __pyx_v_xblock = 0; __pyx_v_yblock = 0; /* "pandas/_libs/sparse_op_helper.pxi":5709 * * # to suppress Cython warning * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5709, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":5710 * # to suppress Cython warning * x = x_ * y = y_ # <<<<<<<<<<<<<< * * out_index = xindex.make_union(yindex) */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5710, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":5712 * y = y_ * * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5713 * * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * # Wow, what a hack job. Need to do something about this */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_npy_int32(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 5713, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 5713, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5713, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5718 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if yblock == yindex.nblocks: * # use y fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":5719 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ __pyx_t_12 = ((__pyx_v_yblock == __pyx_v_yindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5721 * if yblock == yindex.nblocks: * # use y fill value * out[out_i] = x[xi] | yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_13 = __pyx_v_xi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_x.diminfo[0].strides)) | __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5722 * # use y fill value * out[out_i] = x[xi] | yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5725 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5726 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5727 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * continue */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5728 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5726 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5729 * xblock += 1 * xbp = 0 * continue # <<<<<<<<<<<<<< * * if xblock == xindex.nblocks: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5719 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if yblock == yindex.nblocks: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":5731 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill | y[yi] */ __pyx_t_12 = ((__pyx_v_xblock == __pyx_v_xindex->nblocks) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5733 * if xblock == xindex.nblocks: * # use x fill value * out[out_i] = xfill | y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_t_15 = __pyx_v_yi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5734 * # use x fill value * out[out_i] = xfill | y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5737 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5738 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5739 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * continue */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5740 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * continue * */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5738 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5741 * yblock += 1 * ybp = 0 * continue # <<<<<<<<<<<<<< * * yloc = yindex.locbuf[yblock] + ybp */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5731 * continue * * if xblock == xindex.nblocks: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill | y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":5743 * continue * * yloc = yindex.locbuf[yblock] + ybp # <<<<<<<<<<<<<< * xloc = xindex.locbuf[xblock] + xbp * */ __pyx_v_yloc = ((__pyx_v_yindex->locbuf[__pyx_v_yblock]) + __pyx_v_ybp); /* "pandas/_libs/sparse_op_helper.pxi":5744 * * yloc = yindex.locbuf[yblock] + ybp * xloc = xindex.locbuf[xblock] + xbp # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_v_xloc = ((__pyx_v_xindex->locbuf[__pyx_v_xblock]) + __pyx_v_xbp); /* "pandas/_libs/sparse_op_helper.pxi":5747 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] | y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5748 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] | y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_17 = __pyx_v_xi; __pyx_t_18 = __pyx_v_yi; __pyx_t_19 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_x.diminfo[0].strides)) | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5749 * if xloc == yloc: * out[out_i] = x[xi] | y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5750 * out[out_i] = x[xi] | y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * * # advance both locations */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5753 * * # advance both locations * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5754 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5755 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5756 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * * ybp += 1 */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5754 * # advance both locations * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5758 * xbp = 0 * * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5759 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5760 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5761 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * elif xloc < yloc: */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5759 * * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5747 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] | y[yi] * xi += 1 */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":5763 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5765 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] | yfill # <<<<<<<<<<<<<< * xi += 1 * */ __pyx_t_20 = __pyx_v_xi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_x.diminfo[0].strides)) | __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5766 * # use y fill value * out[out_i] = x[xi] | yfill * xi += 1 # <<<<<<<<<<<<<< * * # advance x location */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5769 * * # advance x location * xbp += 1 # <<<<<<<<<<<<<< * if xbp == xindex.lenbuf[xblock]: * xblock += 1 */ __pyx_v_xbp = (__pyx_v_xbp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5770 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ __pyx_t_12 = ((__pyx_v_xbp == (__pyx_v_xindex->lenbuf[__pyx_v_xblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5771 * xbp += 1 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 # <<<<<<<<<<<<<< * xbp = 0 * else: */ __pyx_v_xblock = (__pyx_v_xblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5772 * if xbp == xindex.lenbuf[xblock]: * xblock += 1 * xbp = 0 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xbp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5770 * # advance x location * xbp += 1 * if xbp == xindex.lenbuf[xblock]: # <<<<<<<<<<<<<< * xblock += 1 * xbp = 0 */ } /* "pandas/_libs/sparse_op_helper.pxi":5763 * ybp = 0 * * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ goto __pyx_L9; } /* "pandas/_libs/sparse_op_helper.pxi":5775 * else: * # use x fill value * out[out_i] = xfill | y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_22 = __pyx_v_yi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5776 * # use x fill value * out[out_i] = xfill | y[yi] * yi += 1 # <<<<<<<<<<<<<< * * # advance y location */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5779 * * # advance y location * ybp += 1 # <<<<<<<<<<<<<< * if ybp == yindex.lenbuf[yblock]: * yblock += 1 */ __pyx_v_ybp = (__pyx_v_ybp + 1); /* "pandas/_libs/sparse_op_helper.pxi":5780 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ __pyx_t_12 = ((__pyx_v_ybp == (__pyx_v_yindex->lenbuf[__pyx_v_yblock])) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5781 * ybp += 1 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 # <<<<<<<<<<<<<< * ybp = 0 * */ __pyx_v_yblock = (__pyx_v_yblock + 1); /* "pandas/_libs/sparse_op_helper.pxi":5782 * if ybp == yindex.lenbuf[yblock]: * yblock += 1 * ybp = 0 # <<<<<<<<<<<<<< * * return out, out_index, xfill | yfill */ __pyx_v_ybp = 0; /* "pandas/_libs/sparse_op_helper.pxi":5780 * # advance y location * ybp += 1 * if ybp == yindex.lenbuf[yblock]: # <<<<<<<<<<<<<< * yblock += 1 * ybp = 0 */ } } __pyx_L9:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":5784 * ybp = 0 * * return out, out_index, xfill | yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_xfill | __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5688 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple block_op_or_uint8(ndarray x_, # <<<<<<<<<<<<<< * BlockIndex xindex, * uint8_t xfill, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.block_op_or_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5789 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_or_uint8(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * uint8_t xfill, * ndarray y_, IntIndex yindex, */ static CYTHON_INLINE PyObject *__pyx_f_6pandas_5_libs_6sparse_int_op_or_uint8(PyArrayObject *__pyx_v_x_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_xindex, __pyx_t_5numpy_uint8_t __pyx_v_xfill, PyArrayObject *__pyx_v_y_, struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_yindex, __pyx_t_5numpy_uint8_t __pyx_v_yfill) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_out_index = 0; Py_ssize_t __pyx_v_xi; Py_ssize_t __pyx_v_yi; Py_ssize_t __pyx_v_out_i; __pyx_t_5numpy_int32_t __pyx_v_xloc; __pyx_t_5numpy_int32_t __pyx_v_yloc; PyArrayObject *__pyx_v_xindices = 0; PyArrayObject *__pyx_v_yindices = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_out_indices = 0; PyArrayObject *__pyx_v_x = 0; PyArrayObject *__pyx_v_y = 0; PyArrayObject *__pyx_v_out = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_out; __Pyx_Buffer __pyx_pybuffer_out; __Pyx_LocalBuf_ND __pyx_pybuffernd_out_indices; __Pyx_Buffer __pyx_pybuffer_out_indices; __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_xindices; __Pyx_Buffer __pyx_pybuffer_xindices; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; __Pyx_LocalBuf_ND __pyx_pybuffernd_yindices; __Pyx_Buffer __pyx_pybuffer_yindices; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; int __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; Py_ssize_t __pyx_t_25; __Pyx_RefNannySetupContext("int_op_or_uint8", 0); __pyx_pybuffer_xindices.pybuffer.buf = NULL; __pyx_pybuffer_xindices.refcount = 0; __pyx_pybuffernd_xindices.data = NULL; __pyx_pybuffernd_xindices.rcbuffer = &__pyx_pybuffer_xindices; __pyx_pybuffer_yindices.pybuffer.buf = NULL; __pyx_pybuffer_yindices.refcount = 0; __pyx_pybuffernd_yindices.data = NULL; __pyx_pybuffernd_yindices.rcbuffer = &__pyx_pybuffer_yindices; __pyx_pybuffer_out_indices.pybuffer.buf = NULL; __pyx_pybuffer_out_indices.refcount = 0; __pyx_pybuffernd_out_indices.data = NULL; __pyx_pybuffernd_out_indices.rcbuffer = &__pyx_pybuffer_out_indices; __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; __pyx_pybuffer_out.pybuffer.buf = NULL; __pyx_pybuffer_out.refcount = 0; __pyx_pybuffernd_out.data = NULL; __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out; /* "pandas/_libs/sparse_op_helper.pxi":5795 * cdef: * IntIndex out_index * Py_ssize_t xi = 0, yi = 0, out_i = 0 # fp buf indices # <<<<<<<<<<<<<< * int32_t xloc, yloc * ndarray[int32_t, ndim=1] xindices, yindices, out_indices */ __pyx_v_xi = 0; __pyx_v_yi = 0; __pyx_v_out_i = 0; /* "pandas/_libs/sparse_op_helper.pxi":5802 * * # suppress Cython compiler warnings due to inlining * x = x_ # <<<<<<<<<<<<<< * y = y_ * */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_x_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5802, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_x_)); __pyx_v_x = ((PyArrayObject *)__pyx_v_x_); /* "pandas/_libs/sparse_op_helper.pxi":5803 * # suppress Cython compiler warnings due to inlining * x = x_ * y = y_ # <<<<<<<<<<<<<< * * # need to do this first to know size of result array */ { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_y_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5803, __pyx_L1_error) } __Pyx_INCREF(((PyObject *)__pyx_v_y_)); __pyx_v_y = ((PyArrayObject *)__pyx_v_y_); /* "pandas/_libs/sparse_op_helper.pxi":5806 * * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) # <<<<<<<<<<<<<< * out = np.empty(out_index.npoints, dtype=np.uint8) * */ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex *)__pyx_v_xindex->__pyx_vtab)->make_union(__pyx_v_xindex, ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v_yindex), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_out_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5); __pyx_t_5 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5807 * # need to do this first to know size of result array * out_index = xindex.make_union(yindex) * out = np.empty(out_index.npoints, dtype=np.uint8) # <<<<<<<<<<<<<< * * xindices = xindex.indices */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_out_index->npoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(2, 5807, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 5807, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5807, __pyx_L1_error) } __pyx_t_10 = 0; __pyx_v_out = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5809 * out = np.empty(out_index.npoints, dtype=np.uint8) * * xindices = xindex.indices # <<<<<<<<<<<<<< * yindices = yindex.indices * out_indices = out_index.indices */ __pyx_t_9 = ((PyObject *)__pyx_v_xindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_xindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_xindices.diminfo[0].strides = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_xindices.diminfo[0].shape = __pyx_pybuffernd_xindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5809, __pyx_L1_error) } __pyx_v_xindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5810 * * xindices = xindex.indices * yindices = yindex.indices # <<<<<<<<<<<<<< * out_indices = out_index.indices * */ __pyx_t_9 = ((PyObject *)__pyx_v_yindex->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer, (PyObject*)__pyx_v_yindices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_2); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_2, __pyx_t_3, __pyx_t_4); } __pyx_t_2 = __pyx_t_3 = __pyx_t_4 = 0; } __pyx_pybuffernd_yindices.diminfo[0].strides = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_yindices.diminfo[0].shape = __pyx_pybuffernd_yindices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5810, __pyx_L1_error) } __pyx_v_yindices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5811 * xindices = xindex.indices * yindices = yindex.indices * out_indices = out_index.indices # <<<<<<<<<<<<<< * * # walk the two SparseVectors, adding matched locations... */ __pyx_t_9 = ((PyObject *)__pyx_v_out_index->indices); __Pyx_INCREF(__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_9), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_1 < 0)) { PyErr_Fetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_indices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_2); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_4, __pyx_t_3, __pyx_t_2); } __pyx_t_4 = __pyx_t_3 = __pyx_t_2 = 0; } __pyx_pybuffernd_out_indices.diminfo[0].strides = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_indices.diminfo[0].shape = __pyx_pybuffernd_out_indices.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 5811, __pyx_L1_error) } __pyx_v_out_indices = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; /* "pandas/_libs/sparse_op_helper.pxi":5814 * * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: # <<<<<<<<<<<<<< * if xi == xindex.npoints: * # use x fill value */ __pyx_t_11 = __pyx_v_out_index->npoints; for (__pyx_v_out_i = 0; __pyx_v_out_i < __pyx_t_11; __pyx_v_out_i++) { /* "pandas/_libs/sparse_op_helper.pxi":5815 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill | y[yi] */ __pyx_t_12 = ((__pyx_v_xi == __pyx_v_xindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5817 * if xi == xindex.npoints: * # use x fill value * out[out_i] = xfill | y[yi] # <<<<<<<<<<<<<< * yi += 1 * continue */ __pyx_t_13 = __pyx_v_yi; __pyx_t_14 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5818 * # use x fill value * out[out_i] = xfill | y[yi] * yi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5819 * out[out_i] = xfill | y[yi] * yi += 1 * continue # <<<<<<<<<<<<<< * * if yi == yindex.npoints: */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5815 * # walk the two SparseVectors, adding matched locations... * for out_i from 0 <= out_i < out_index.npoints: * if xi == xindex.npoints: # <<<<<<<<<<<<<< * # use x fill value * out[out_i] = xfill | y[yi] */ } /* "pandas/_libs/sparse_op_helper.pxi":5821 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ __pyx_t_12 = ((__pyx_v_yi == __pyx_v_yindex->npoints) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5823 * if yi == yindex.npoints: * # use y fill value * out[out_i] = x[xi] | yfill # <<<<<<<<<<<<<< * xi += 1 * continue */ __pyx_t_15 = __pyx_v_xi; __pyx_t_16 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_x.diminfo[0].strides)) | __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5824 * # use y fill value * out[out_i] = x[xi] | yfill * xi += 1 # <<<<<<<<<<<<<< * continue * */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5825 * out[out_i] = x[xi] | yfill * xi += 1 * continue # <<<<<<<<<<<<<< * * xloc = xindices[xi] */ goto __pyx_L3_continue; /* "pandas/_libs/sparse_op_helper.pxi":5821 * continue * * if yi == yindex.npoints: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ } /* "pandas/_libs/sparse_op_helper.pxi":5827 * continue * * xloc = xindices[xi] # <<<<<<<<<<<<<< * yloc = yindices[yi] * */ __pyx_t_17 = __pyx_v_xi; __pyx_v_xloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_xindices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_xindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":5828 * * xloc = xindices[xi] * yloc = yindices[yi] # <<<<<<<<<<<<<< * * # each index in the out_index had to come from either x, y, or both */ __pyx_t_18 = __pyx_v_yi; __pyx_v_yloc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_yindices.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_yindices.diminfo[0].strides)); /* "pandas/_libs/sparse_op_helper.pxi":5831 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] | y[yi] * xi += 1 */ __pyx_t_12 = ((__pyx_v_xloc == __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5832 * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: * out[out_i] = x[xi] | y[yi] # <<<<<<<<<<<<<< * xi += 1 * yi += 1 */ __pyx_t_19 = __pyx_v_xi; __pyx_t_20 = __pyx_v_yi; __pyx_t_21 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_x.diminfo[0].strides)) | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5833 * if xloc == yloc: * out[out_i] = x[xi] | y[yi] * xi += 1 # <<<<<<<<<<<<<< * yi += 1 * elif xloc < yloc: */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5834 * out[out_i] = x[xi] | y[yi] * xi += 1 * yi += 1 # <<<<<<<<<<<<<< * elif xloc < yloc: * # use y fill value */ __pyx_v_yi = (__pyx_v_yi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5831 * * # each index in the out_index had to come from either x, y, or both * if xloc == yloc: # <<<<<<<<<<<<<< * out[out_i] = x[xi] | y[yi] * xi += 1 */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":5835 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ __pyx_t_12 = ((__pyx_v_xloc < __pyx_v_yloc) != 0); if (__pyx_t_12) { /* "pandas/_libs/sparse_op_helper.pxi":5837 * elif xloc < yloc: * # use y fill value * out[out_i] = x[xi] | yfill # <<<<<<<<<<<<<< * xi += 1 * else: */ __pyx_t_22 = __pyx_v_xi; __pyx_t_23 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_out.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_x.diminfo[0].strides)) | __pyx_v_yfill); /* "pandas/_libs/sparse_op_helper.pxi":5838 * # use y fill value * out[out_i] = x[xi] | yfill * xi += 1 # <<<<<<<<<<<<<< * else: * # use x fill value */ __pyx_v_xi = (__pyx_v_xi + 1); /* "pandas/_libs/sparse_op_helper.pxi":5835 * xi += 1 * yi += 1 * elif xloc < yloc: # <<<<<<<<<<<<<< * # use y fill value * out[out_i] = x[xi] | yfill */ goto __pyx_L7; } /* "pandas/_libs/sparse_op_helper.pxi":5841 * else: * # use x fill value * out[out_i] = xfill | y[yi] # <<<<<<<<<<<<<< * yi += 1 * */ /*else*/ { __pyx_t_24 = __pyx_v_yi; __pyx_t_25 = __pyx_v_out_i; *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_out.diminfo[0].strides) = (__pyx_v_xfill | (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y.diminfo[0].strides))); /* "pandas/_libs/sparse_op_helper.pxi":5842 * # use x fill value * out[out_i] = xfill | y[yi] * yi += 1 # <<<<<<<<<<<<<< * * return out, out_index, xfill | yfill */ __pyx_v_yi = (__pyx_v_yi + 1); } __pyx_L7:; __pyx_L3_continue:; } /* "pandas/_libs/sparse_op_helper.pxi":5844 * yi += 1 * * return out, out_index, xfill | yfill # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_xfill | __pyx_v_yfill)); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_out)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_out)); __Pyx_INCREF(((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(((PyObject *)__pyx_v_out_index)); PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_out_index)); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9); __pyx_t_9 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5789 * @cython.wraparound(False) * @cython.boundscheck(False) * cdef inline tuple int_op_or_uint8(ndarray x_, IntIndex xindex, # <<<<<<<<<<<<<< * uint8_t xfill, * ndarray y_, IntIndex yindex, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.int_op_or_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_indices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_xindices.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_yindices.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_out_index); __Pyx_XDECREF((PyObject *)__pyx_v_xindices); __Pyx_XDECREF((PyObject *)__pyx_v_yindices); __Pyx_XDECREF((PyObject *)__pyx_v_out_indices); __Pyx_XDECREF((PyObject *)__pyx_v_x); __Pyx_XDECREF((PyObject *)__pyx_v_y); __Pyx_XDECREF((PyObject *)__pyx_v_out); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5847 * * * cpdef sparse_or_uint8(ndarray[uint8_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, uint8_t xfill, * ndarray[uint8_t, ndim=1] y, */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_127sparse_or_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_or_uint8(PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_uint8_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_uint8_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("sparse_or_uint8", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5847, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5847, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse_op_helper.pxi":5852 * SparseIndex yindex, uint8_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_or_uint8(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "pandas/_libs/sparse_op_helper.pxi":5853 * * if isinstance(xindex, BlockIndex): * return block_op_or_uint8(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5853, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 5853, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5854 * if isinstance(xindex, BlockIndex): * return block_op_or_uint8(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) # <<<<<<<<<<<<<< * elif isinstance(xindex, IntIndex): * return int_op_or_uint8(x, xindex.to_int_index(), xfill, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_block_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5854, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5854, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(2, 5854, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5853 * * if isinstance(xindex, BlockIndex): * return block_op_or_uint8(x, xindex.to_block_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): */ __pyx_t_5 = __pyx_f_6pandas_5_libs_6sparse_block_op_or_uint8(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_3), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5852 * SparseIndex yindex, uint8_t yfill): * * if isinstance(xindex, BlockIndex): # <<<<<<<<<<<<<< * return block_op_or_uint8(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":5855 * return block_op_or_uint8(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_or_uint8(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex); __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { /* "pandas/_libs/sparse_op_helper.pxi":5856 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_or_uint8(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_xindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5856, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5856, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 5856, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5857 * elif isinstance(xindex, IntIndex): * return int_op_or_uint8(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) # <<<<<<<<<<<<<< * else: * raise NotImplementedError */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_yindex), __pyx_n_s_to_int_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5857, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5857, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pandas_5_libs_6sparse_IntIndex))))) __PYX_ERR(2, 5857, __pyx_L1_error) /* "pandas/_libs/sparse_op_helper.pxi":5856 * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): * return int_op_or_uint8(x, xindex.to_int_index(), xfill, # <<<<<<<<<<<<<< * y, yindex.to_int_index(), yfill) * else: */ __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse_int_op_or_uint8(((PyArrayObject *)__pyx_v_x), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_5), __pyx_v_xfill, ((PyArrayObject *)__pyx_v_y), ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)__pyx_t_4), __pyx_v_yfill); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5855 * return block_op_or_uint8(x, xindex.to_block_index(), xfill, * y, yindex.to_block_index(), yfill) * elif isinstance(xindex, IntIndex): # <<<<<<<<<<<<<< * return int_op_or_uint8(x, xindex.to_int_index(), xfill, * y, yindex.to_int_index(), yfill) */ } /* "pandas/_libs/sparse_op_helper.pxi":5859 * y, yindex.to_int_index(), yfill) * else: * raise NotImplementedError # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 5859, __pyx_L1_error) } /* "pandas/_libs/sparse_op_helper.pxi":5847 * * * cpdef sparse_or_uint8(ndarray[uint8_t, ndim=1] x, # <<<<<<<<<<<<<< * SparseIndex xindex, uint8_t xfill, * ndarray[uint8_t, ndim=1] y, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_or_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_127sparse_or_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_127sparse_or_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_x = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex = 0; __pyx_t_5numpy_uint8_t __pyx_v_xfill; PyArrayObject *__pyx_v_y = 0; struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex = 0; __pyx_t_5numpy_uint8_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_or_uint8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_xindex,&__pyx_n_s_xfill,&__pyx_n_s_y,&__pyx_n_s_yindex,&__pyx_n_s_yfill,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_or_uint8", 1, 6, 6, 1); __PYX_ERR(2, 5847, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_or_uint8", 1, 6, 6, 2); __PYX_ERR(2, 5847, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_or_uint8", 1, 6, 6, 3); __PYX_ERR(2, 5847, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yindex)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_or_uint8", 1, 6, 6, 4); __PYX_ERR(2, 5847, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_or_uint8", 1, 6, 6, 5); __PYX_ERR(2, 5847, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_or_uint8") < 0)) __PYX_ERR(2, 5847, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_x = ((PyArrayObject *)values[0]); __pyx_v_xindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[1]); __pyx_v_xfill = __Pyx_PyInt_As_npy_uint8(values[2]); if (unlikely((__pyx_v_xfill == ((npy_uint8)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5848, __pyx_L3_error) __pyx_v_y = ((PyArrayObject *)values[3]); __pyx_v_yindex = ((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)values[4]); __pyx_v_yfill = __Pyx_PyInt_As_npy_uint8(values[5]); if (unlikely((__pyx_v_yfill == ((npy_uint8)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5850, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_or_uint8", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5847, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_or_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(2, 5847, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "xindex", 0))) __PYX_ERR(2, 5848, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) __PYX_ERR(2, 5849, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yindex), __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex, 1, "yindex", 0))) __PYX_ERR(2, 5850, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_126sparse_or_uint8(__pyx_self, __pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_126sparse_or_uint8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_x, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_xindex, __pyx_t_5numpy_uint8_t __pyx_v_xfill, PyArrayObject *__pyx_v_y, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v_yindex, __pyx_t_5numpy_uint8_t __pyx_v_yfill) { __Pyx_LocalBuf_ND __pyx_pybuffernd_x; __Pyx_Buffer __pyx_pybuffer_x; __Pyx_LocalBuf_ND __pyx_pybuffernd_y; __Pyx_Buffer __pyx_pybuffer_y; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_or_uint8", 0); __pyx_pybuffer_x.pybuffer.buf = NULL; __pyx_pybuffer_x.refcount = 0; __pyx_pybuffernd_x.data = NULL; __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x; __pyx_pybuffer_y.pybuffer.buf = NULL; __pyx_pybuffer_y.refcount = 0; __pyx_pybuffernd_y.data = NULL; __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5847, __pyx_L1_error) } __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 5847, __pyx_L1_error) } __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_or_uint8(__pyx_v_x, __pyx_v_xindex, __pyx_v_xfill, __pyx_v_y, __pyx_v_yindex, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.sparse_or_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse_op_helper.pxi":5862 * * * cpdef sparse_fill_or_uint8(uint8_t xfill, # <<<<<<<<<<<<<< * uint8_t yfill): * return xfill | yfill */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_129sparse_fill_or_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6pandas_5_libs_6sparse_sparse_fill_or_uint8(__pyx_t_5numpy_uint8_t __pyx_v_xfill, __pyx_t_5numpy_uint8_t __pyx_v_yfill, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_or_uint8", 0); /* "pandas/_libs/sparse_op_helper.pxi":5864 * cpdef sparse_fill_or_uint8(uint8_t xfill, * uint8_t yfill): * return xfill | yfill # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_xfill | __pyx_v_yfill)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "pandas/_libs/sparse_op_helper.pxi":5862 * * * cpdef sparse_fill_or_uint8(uint8_t xfill, # <<<<<<<<<<<<<< * uint8_t yfill): * return xfill | yfill */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_or_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_129sparse_fill_or_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_129sparse_fill_or_uint8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { __pyx_t_5numpy_uint8_t __pyx_v_xfill; __pyx_t_5numpy_uint8_t __pyx_v_yfill; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sparse_fill_or_uint8 (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xfill,&__pyx_n_s_yfill,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xfill)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yfill)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sparse_fill_or_uint8", 1, 2, 2, 1); __PYX_ERR(2, 5862, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sparse_fill_or_uint8") < 0)) __PYX_ERR(2, 5862, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_xfill = __Pyx_PyInt_As_npy_uint8(values[0]); if (unlikely((__pyx_v_xfill == ((npy_uint8)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5862, __pyx_L3_error) __pyx_v_yfill = __Pyx_PyInt_As_npy_uint8(values[1]); if (unlikely((__pyx_v_yfill == ((npy_uint8)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5863, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sparse_fill_or_uint8", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5862, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_or_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_128sparse_fill_or_uint8(__pyx_self, __pyx_v_xfill, __pyx_v_yfill); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_128sparse_fill_or_uint8(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_uint8_t __pyx_v_xfill, __pyx_t_5numpy_uint8_t __pyx_v_yfill) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("sparse_fill_or_uint8", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6pandas_5_libs_6sparse_sparse_fill_or_uint8(__pyx_v_xfill, __pyx_v_yfill, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pandas._libs.sparse.sparse_fill_or_uint8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":801 * # Indexing operations * * def get_reindexer(ndarray[object, ndim=1] values, dict index_map): # <<<<<<<<<<<<<< * cdef object idx * cdef Py_ssize_t i */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_131get_reindexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5_libs_6sparse_131get_reindexer = {"get_reindexer", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_131get_reindexer, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_131get_reindexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_values = 0; PyObject *__pyx_v_index_map = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_reindexer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_index_map,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index_map)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("get_reindexer", 1, 2, 2, 1); __PYX_ERR(0, 801, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reindexer") < 0)) __PYX_ERR(0, 801, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_index_map = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_reindexer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 801, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.get_reindexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) __PYX_ERR(0, 801, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index_map), (&PyDict_Type), 1, "index_map", 1))) __PYX_ERR(0, 801, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_130get_reindexer(__pyx_self, __pyx_v_values, __pyx_v_index_map); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_130get_reindexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_index_map) { PyObject *__pyx_v_idx = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_new_length; PyArrayObject *__pyx_v_indexer = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; int __pyx_t_16; __pyx_t_5numpy_int32_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; __Pyx_RefNannySetupContext("get_reindexer", 0); __pyx_pybuffer_indexer.pybuffer.buf = NULL; __pyx_pybuffer_indexer.refcount = 0; __pyx_pybuffernd_indexer.data = NULL; __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer; __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 801, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse.pyx":804 * cdef object idx * cdef Py_ssize_t i * cdef Py_ssize_t new_length = len(values) # <<<<<<<<<<<<<< * cdef ndarray[int32_t, ndim=1] indexer * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 804, __pyx_L1_error) __pyx_v_new_length = __pyx_t_1; /* "pandas/_libs/sparse.pyx":807 * cdef ndarray[int32_t, ndim=1] indexer * * indexer = np.empty(new_length, dtype=np.int32) # <<<<<<<<<<<<<< * * for i in range(new_length): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_new_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 807, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 807, __pyx_L1_error) } __pyx_t_7 = 0; __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/_libs/sparse.pyx":809 * indexer = np.empty(new_length, dtype=np.int32) * * for i in range(new_length): # <<<<<<<<<<<<<< * idx = values[i] * if idx in index_map: */ __pyx_t_1 = __pyx_v_new_length; __pyx_t_12 = __pyx_t_1; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/_libs/sparse.pyx":810 * * for i in range(new_length): * idx = values[i] # <<<<<<<<<<<<<< * if idx in index_map: * indexer[i] = index_map[idx] */ __pyx_t_14 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_values.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 810, __pyx_L1_error) } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/_libs/sparse.pyx":811 * for i in range(new_length): * idx = values[i] * if idx in index_map: # <<<<<<<<<<<<<< * indexer[i] = index_map[idx] * else: */ if (unlikely(__pyx_v_index_map == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 811, __pyx_L1_error) } __pyx_t_15 = (__Pyx_PyDict_ContainsTF(__pyx_v_idx, __pyx_v_index_map, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 811, __pyx_L1_error) __pyx_t_16 = (__pyx_t_15 != 0); if (__pyx_t_16) { /* "pandas/_libs/sparse.pyx":812 * idx = values[i] * if idx in index_map: * indexer[i] = index_map[idx] # <<<<<<<<<<<<<< * else: * indexer[i] = -1 */ if (unlikely(__pyx_v_index_map == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 812, __pyx_L1_error) } __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_index_map, __pyx_v_idx); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_17 = __Pyx_PyInt_As_npy_int32(__pyx_t_6); if (unlikely((__pyx_t_17 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 812, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_18 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_18 < 0) { __pyx_t_18 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 812, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_t_17; /* "pandas/_libs/sparse.pyx":811 * for i in range(new_length): * idx = values[i] * if idx in index_map: # <<<<<<<<<<<<<< * indexer[i] = index_map[idx] * else: */ goto __pyx_L5; } /* "pandas/_libs/sparse.pyx":814 * indexer[i] = index_map[idx] * else: * indexer[i] = -1 # <<<<<<<<<<<<<< * * return indexer */ /*else*/ { __pyx_t_19 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_19 < 0) { __pyx_t_19 += __pyx_pybuffernd_indexer.diminfo[0].shape; if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 814, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1; } __pyx_L5:; } /* "pandas/_libs/sparse.pyx":816 * indexer[i] = -1 * * return indexer # <<<<<<<<<<<<<< * * # def reindex_block(ndarray[float64_t, ndim=1] values, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_indexer)); __pyx_r = ((PyObject *)__pyx_v_indexer); goto __pyx_L0; /* "pandas/_libs/sparse.pyx":801 * # Indexing operations * * def get_reindexer(ndarray[object, ndim=1] values, dict index_map): # <<<<<<<<<<<<<< * cdef object idx * cdef Py_ssize_t i */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.get_reindexer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_idx); __Pyx_XDECREF((PyObject *)__pyx_v_indexer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":848 * * * def reindex_integer(ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * IntIndex sparse_index, * ndarray[int32_t, ndim=1] indexer): */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_133reindex_integer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5_libs_6sparse_133reindex_integer = {"reindex_integer", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_133reindex_integer, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_133reindex_integer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyArrayObject *__pyx_v_values = 0; CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_sparse_index = 0; CYTHON_UNUSED PyArrayObject *__pyx_v_indexer = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reindex_integer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,&__pyx_n_s_sparse_index,&__pyx_n_s_indexer,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sparse_index)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex_integer", 1, 3, 3, 1); __PYX_ERR(0, 848, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indexer)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("reindex_integer", 1, 3, 3, 2); __PYX_ERR(0, 848, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reindex_integer") < 0)) __PYX_ERR(0, 848, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_values = ((PyArrayObject *)values[0]); __pyx_v_sparse_index = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)values[1]); __pyx_v_indexer = ((PyArrayObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("reindex_integer", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 848, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.reindex_integer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) __PYX_ERR(0, 848, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sparse_index), __pyx_ptype_6pandas_5_libs_6sparse_IntIndex, 1, "sparse_index", 0))) __PYX_ERR(0, 849, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) __PYX_ERR(0, 850, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_132reindex_integer(__pyx_self, __pyx_v_values, __pyx_v_sparse_index, __pyx_v_indexer); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_132reindex_integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyArrayObject *__pyx_v_values, CYTHON_UNUSED struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *__pyx_v_sparse_index, CYTHON_UNUSED PyArrayObject *__pyx_v_indexer) { __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer; __Pyx_Buffer __pyx_pybuffer_indexer; __Pyx_LocalBuf_ND __pyx_pybuffernd_values; __Pyx_Buffer __pyx_pybuffer_values; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reindex_integer", 0); __pyx_pybuffer_values.pybuffer.buf = NULL; __pyx_pybuffer_values.refcount = 0; __pyx_pybuffernd_values.data = NULL; __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values; __pyx_pybuffer_indexer.pybuffer.buf = NULL; __pyx_pybuffer_indexer.refcount = 0; __pyx_pybuffernd_indexer.data = NULL; __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 848, __pyx_L1_error) } __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 848, __pyx_L1_error) } __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0]; /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.reindex_integer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pandas/_libs/sparse.pyx":857 * # SparseArray mask create operations * * def make_mask_object_ndarray(ndarray[object, ndim=1] arr, object fill_value): # <<<<<<<<<<<<<< * cdef object value * cdef Py_ssize_t i */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_135make_mask_object_ndarray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5_libs_6sparse_135make_mask_object_ndarray = {"make_mask_object_ndarray", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_135make_mask_object_ndarray, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_135make_mask_object_ndarray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_arr = 0; PyObject *__pyx_v_fill_value = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("make_mask_object_ndarray (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arr,&__pyx_n_s_fill_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("make_mask_object_ndarray", 1, 2, 2, 1); __PYX_ERR(0, 857, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "make_mask_object_ndarray") < 0)) __PYX_ERR(0, 857, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_arr = ((PyArrayObject *)values[0]); __pyx_v_fill_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("make_mask_object_ndarray", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 857, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.make_mask_object_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) __PYX_ERR(0, 857, __pyx_L1_error) __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_134make_mask_object_ndarray(__pyx_self, __pyx_v_arr, __pyx_v_fill_value); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_134make_mask_object_ndarray(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_fill_value) { PyObject *__pyx_v_value = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_new_length; PyArrayObject *__pyx_v_mask = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_arr; __Pyx_Buffer __pyx_pybuffer_arr; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; Py_ssize_t __pyx_t_14; int __pyx_t_15; int __pyx_t_16; Py_ssize_t __pyx_t_17; __Pyx_RefNannySetupContext("make_mask_object_ndarray", 0); __pyx_pybuffer_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; __pyx_pybuffer_arr.pybuffer.buf = NULL; __pyx_pybuffer_arr.refcount = 0; __pyx_pybuffernd_arr.data = NULL; __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 857, __pyx_L1_error) } __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0]; /* "pandas/_libs/sparse.pyx":860 * cdef object value * cdef Py_ssize_t i * cdef Py_ssize_t new_length = len(arr) # <<<<<<<<<<<<<< * cdef ndarray[int8_t, ndim=1] mask * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 860, __pyx_L1_error) __pyx_v_new_length = __pyx_t_1; /* "pandas/_libs/sparse.pyx":863 * cdef ndarray[int8_t, ndim=1] mask * * mask = np.ones(new_length, dtype=np.int8) # <<<<<<<<<<<<<< * * for i in range(new_length): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ones); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_new_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 863, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack); if (unlikely(__pyx_t_8 < 0)) { PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __pyx_t_9 = __pyx_t_10 = __pyx_t_11 = 0; } __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 863, __pyx_L1_error) } __pyx_t_7 = 0; __pyx_v_mask = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; /* "pandas/_libs/sparse.pyx":865 * mask = np.ones(new_length, dtype=np.int8) * * for i in range(new_length): # <<<<<<<<<<<<<< * value = arr[i] * if value == fill_value and type(value) == type(fill_value): */ __pyx_t_1 = __pyx_v_new_length; __pyx_t_12 = __pyx_t_1; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "pandas/_libs/sparse.pyx":866 * * for i in range(new_length): * value = arr[i] # <<<<<<<<<<<<<< * if value == fill_value and type(value) == type(fill_value): * mask[i] = 0 */ __pyx_t_14 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_14 < 0) { __pyx_t_14 += __pyx_pybuffernd_arr.diminfo[0].shape; if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 866, __pyx_L1_error) } __pyx_t_6 = (PyObject *) *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides); __Pyx_INCREF((PyObject*)__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; /* "pandas/_libs/sparse.pyx":867 * for i in range(new_length): * value = arr[i] * if value == fill_value and type(value) == type(fill_value): # <<<<<<<<<<<<<< * mask[i] = 0 * */ __pyx_t_6 = PyObject_RichCompare(__pyx_v_value, __pyx_v_fill_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error) __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_16) { } else { __pyx_t_15 = __pyx_t_16; goto __pyx_L6_bool_binop_done; } __pyx_t_6 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_value)), ((PyObject *)Py_TYPE(__pyx_v_fill_value)), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error) __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __pyx_t_16; __pyx_L6_bool_binop_done:; if (__pyx_t_15) { /* "pandas/_libs/sparse.pyx":868 * value = arr[i] * if value == fill_value and type(value) == type(fill_value): * mask[i] = 0 # <<<<<<<<<<<<<< * * return mask.view(dtype=np.bool) */ __pyx_t_17 = __pyx_v_i; __pyx_t_8 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_mask.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); __PYX_ERR(0, 868, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_mask.diminfo[0].strides) = 0; /* "pandas/_libs/sparse.pyx":867 * for i in range(new_length): * value = arr[i] * if value == fill_value and type(value) == type(fill_value): # <<<<<<<<<<<<<< * mask[i] = 0 * */ } } /* "pandas/_libs/sparse.pyx":870 * mask[i] = 0 * * return mask.view(dtype=np.bool) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mask), __pyx_n_s_view); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pandas/_libs/sparse.pyx":857 * # SparseArray mask create operations * * def make_mask_object_ndarray(ndarray[object, ndim=1] arr, object fill_value): # <<<<<<<<<<<<<< * cdef object value * cdef Py_ssize_t i */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pandas._libs.sparse.make_mask_object_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF((PyObject *)__pyx_v_mask); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_SparseIndex(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_137__pyx_unpickle_SparseIndex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5_libs_6sparse_137__pyx_unpickle_SparseIndex = {"__pyx_unpickle_SparseIndex", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_137__pyx_unpickle_SparseIndex, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_137__pyx_unpickle_SparseIndex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_SparseIndex (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SparseIndex", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SparseIndex", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SparseIndex") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SparseIndex", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_SparseIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_136__pyx_unpickle_SparseIndex(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_136__pyx_unpickle_SparseIndex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = NULL; PyObject *__pyx_v___pyx_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("__pyx_unpickle_SparseIndex", 0); /* "(tree fragment)":2 * def __pyx_unpickle_SparseIndex(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0); if (__pyx_t_1) { /* "(tree fragment)":3 * def __pyx_unpickle_SparseIndex(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = SparseIndex.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":4 * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = SparseIndex.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":2 * def __pyx_unpickle_SparseIndex(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) */ } /* "(tree fragment)":5 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = SparseIndex.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_SparseIndex__set_state( __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_SparseIndex), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v___pyx_type); __Pyx_GIVEREF(__pyx_v___pyx_type); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":6 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = SparseIndex.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_SparseIndex__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { /* "(tree fragment)":7 * __pyx_result = SparseIndex.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_SparseIndex__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_SparseIndex__set_state(SparseIndex __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 7, __pyx_L1_error) __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_SparseIndex__set_state(((struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) * __pyx_result = SparseIndex.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_SparseIndex__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":8 * if __pyx_state is not None: * __pyx_unpickle_SparseIndex__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_SparseIndex__set_state(SparseIndex __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_SparseIndex(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_SparseIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":9 * __pyx_unpickle_SparseIndex__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_SparseIndex__set_state(SparseIndex __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ static PyObject *__pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_SparseIndex__set_state(struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_SparseIndex__set_state", 0); /* "(tree fragment)":10 * return __pyx_result * cdef __pyx_unpickle_SparseIndex__set_state(SparseIndex __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 10, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 10, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "(tree fragment)":11 * cdef __pyx_unpickle_SparseIndex__set_state(SparseIndex __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<< */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 11, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":10 * return __pyx_result * cdef __pyx_unpickle_SparseIndex__set_state(SparseIndex __pyx_result, tuple __pyx_state): * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[0]) */ } /* "(tree fragment)":9 * __pyx_unpickle_SparseIndex__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_SparseIndex__set_state(SparseIndex __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_SparseIndex__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_BlockMerge(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_139__pyx_unpickle_BlockMerge(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5_libs_6sparse_139__pyx_unpickle_BlockMerge = {"__pyx_unpickle_BlockMerge", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_139__pyx_unpickle_BlockMerge, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_139__pyx_unpickle_BlockMerge(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_BlockMerge (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BlockMerge", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BlockMerge", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BlockMerge") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BlockMerge", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_BlockMerge", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_138__pyx_unpickle_BlockMerge(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_138__pyx_unpickle_BlockMerge(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = NULL; PyObject *__pyx_v___pyx_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("__pyx_unpickle_BlockMerge", 0); /* "(tree fragment)":2 * def __pyx_unpickle_BlockMerge(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0x0ce6794: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0ce6794) != 0); if (__pyx_t_1) { /* "(tree fragment)":3 * def __pyx_unpickle_BlockMerge(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockMerge.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":4 * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = BlockMerge.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x0c, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":2 * def __pyx_unpickle_BlockMerge(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0x0ce6794: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) */ } /* "(tree fragment)":5 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockMerge.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_BlockMerge__set_state( __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_BlockMerge), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v___pyx_type); __Pyx_GIVEREF(__pyx_v___pyx_type); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":6 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockMerge.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_BlockMerge__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { /* "(tree fragment)":7 * __pyx_result = BlockMerge.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_BlockMerge__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_BlockMerge__set_state(BlockMerge __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 7, __pyx_L1_error) __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockMerge__set_state(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockMerge.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_BlockMerge__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":8 * if __pyx_state is not None: * __pyx_unpickle_BlockMerge__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_BlockMerge__set_state(BlockMerge __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_BlockMerge(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_BlockMerge", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":9 * __pyx_unpickle_BlockMerge__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BlockMerge__set_state(BlockMerge __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockMerge__set_state(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __pyx_t_5numpy_int32_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_BlockMerge__set_state", 0); /* "(tree fragment)":10 * return __pyx_result * cdef __pyx_unpickle_BlockMerge__set_state(BlockMerge __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] # <<<<<<<<<<<<<< * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[11]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->result); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->result)); __pyx_v___pyx_result->result = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->x); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->x)); __pyx_v___pyx_result->x = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->xend); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->xend)); __pyx_v___pyx_result->xend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->xi = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->xlen); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->xlen)); __pyx_v___pyx_result->xlen = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->xstart); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->xstart)); __pyx_v___pyx_result->xstart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->y); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->y)); __pyx_v___pyx_result->y = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->yend); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->yend)); __pyx_v___pyx_result->yend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->yi = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->ylen); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->ylen)); __pyx_v___pyx_result->ylen = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->ystart); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->ystart)); __pyx_v___pyx_result->ystart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":11 * cdef __pyx_unpickle_BlockMerge__set_state(BlockMerge __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[11]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 11, __pyx_L1_error) } __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 > 11) != 0); if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 11, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { /* "(tree fragment)":12 * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[11]) # <<<<<<<<<<<<<< */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_9) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":11 * cdef __pyx_unpickle_BlockMerge__set_state(BlockMerge __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[11]) */ } /* "(tree fragment)":9 * __pyx_unpickle_BlockMerge__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BlockMerge__set_state(BlockMerge __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_BlockMerge__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_BlockIntersection(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_141__pyx_unpickle_BlockIntersection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5_libs_6sparse_141__pyx_unpickle_BlockIntersection = {"__pyx_unpickle_BlockIntersection", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_141__pyx_unpickle_BlockIntersection, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_141__pyx_unpickle_BlockIntersection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_BlockIntersection (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BlockIntersection", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BlockIntersection", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BlockIntersection") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BlockIntersection", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_BlockIntersection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_140__pyx_unpickle_BlockIntersection(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_140__pyx_unpickle_BlockIntersection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = NULL; PyObject *__pyx_v___pyx_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("__pyx_unpickle_BlockIntersection", 0); /* "(tree fragment)":2 * def __pyx_unpickle_BlockIntersection(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0x0ce6794: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0ce6794) != 0); if (__pyx_t_1) { /* "(tree fragment)":3 * def __pyx_unpickle_BlockIntersection(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockIntersection.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":4 * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = BlockIntersection.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x0c, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":2 * def __pyx_unpickle_BlockIntersection(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0x0ce6794: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) */ } /* "(tree fragment)":5 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockIntersection.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_BlockIntersection__set_state( __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_BlockIntersection), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v___pyx_type); __Pyx_GIVEREF(__pyx_v___pyx_type); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":6 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockIntersection.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_BlockIntersection__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { /* "(tree fragment)":7 * __pyx_result = BlockIntersection.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_BlockIntersection__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_BlockIntersection__set_state(BlockIntersection __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 7, __pyx_L1_error) __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockIntersection__set_state(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockIntersection.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_BlockIntersection__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":8 * if __pyx_state is not None: * __pyx_unpickle_BlockIntersection__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_BlockIntersection__set_state(BlockIntersection __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_BlockIntersection(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_BlockIntersection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":9 * __pyx_unpickle_BlockIntersection__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BlockIntersection__set_state(BlockIntersection __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockIntersection__set_state(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __pyx_t_5numpy_int32_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_BlockIntersection__set_state", 0); /* "(tree fragment)":10 * return __pyx_result * cdef __pyx_unpickle_BlockIntersection__set_state(BlockIntersection __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] # <<<<<<<<<<<<<< * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[11]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.result); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.result)); __pyx_v___pyx_result->__pyx_base.result = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.x); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.x)); __pyx_v___pyx_result->__pyx_base.x = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.xend); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.xend)); __pyx_v___pyx_result->__pyx_base.xend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->__pyx_base.xi = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.xlen); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.xlen)); __pyx_v___pyx_result->__pyx_base.xlen = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.xstart); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.xstart)); __pyx_v___pyx_result->__pyx_base.xstart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.y); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.y)); __pyx_v___pyx_result->__pyx_base.y = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.yend); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.yend)); __pyx_v___pyx_result->__pyx_base.yend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->__pyx_base.yi = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.ylen); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.ylen)); __pyx_v___pyx_result->__pyx_base.ylen = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.ystart); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.ystart)); __pyx_v___pyx_result->__pyx_base.ystart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":11 * cdef __pyx_unpickle_BlockIntersection__set_state(BlockIntersection __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[11]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 11, __pyx_L1_error) } __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 > 11) != 0); if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 11, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { /* "(tree fragment)":12 * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[11]) # <<<<<<<<<<<<<< */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_9) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":11 * cdef __pyx_unpickle_BlockIntersection__set_state(BlockIntersection __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[11]) */ } /* "(tree fragment)":9 * __pyx_unpickle_BlockIntersection__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BlockIntersection__set_state(BlockIntersection __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_BlockIntersection__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __pyx_unpickle_BlockUnion(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError */ /* Python wrapper */ static PyObject *__pyx_pw_6pandas_5_libs_6sparse_143__pyx_unpickle_BlockUnion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6pandas_5_libs_6sparse_143__pyx_unpickle_BlockUnion = {"__pyx_unpickle_BlockUnion", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_143__pyx_unpickle_BlockUnion, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6pandas_5_libs_6sparse_143__pyx_unpickle_BlockUnion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_BlockUnion (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BlockUnion", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BlockUnion", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BlockUnion") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) __pyx_v___pyx_state = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BlockUnion", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_BlockUnion", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pandas_5_libs_6sparse_142__pyx_unpickle_BlockUnion(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6pandas_5_libs_6sparse_142__pyx_unpickle_BlockUnion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = NULL; PyObject *__pyx_v___pyx_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("__pyx_unpickle_BlockUnion", 0); /* "(tree fragment)":2 * def __pyx_unpickle_BlockUnion(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0x0ce6794: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) */ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0ce6794) != 0); if (__pyx_t_1) { /* "(tree fragment)":3 * def __pyx_unpickle_BlockUnion(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockUnion.__new__(__pyx_type) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":4 * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = BlockUnion.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x0c, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":2 * def __pyx_unpickle_BlockUnion(__pyx_type, long __pyx_checksum, __pyx_state): * if __pyx_checksum != 0x0ce6794: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) */ } /* "(tree fragment)":5 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockUnion.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_BlockUnion__set_state( __pyx_result, __pyx_state) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pandas_5_libs_6sparse_BlockUnion), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v___pyx_type); __Pyx_GIVEREF(__pyx_v___pyx_type); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; /* "(tree fragment)":6 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockUnion.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_BlockUnion__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { /* "(tree fragment)":7 * __pyx_result = BlockUnion.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_BlockUnion__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_BlockUnion__set_state(BlockUnion __pyx_result, tuple __pyx_state): */ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 7, __pyx_L1_error) __pyx_t_3 = __pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockUnion__set_state(((struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0ce6794 = (result, x, xend, xi, xlen, xstart, y, yend, yi, ylen, ystart))" % __pyx_checksum) * __pyx_result = BlockUnion.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_BlockUnion__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":8 * if __pyx_state is not None: * __pyx_unpickle_BlockUnion__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_BlockUnion__set_state(BlockUnion __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":1 * def __pyx_unpickle_BlockUnion(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_BlockUnion", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":9 * __pyx_unpickle_BlockUnion__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BlockUnion__set_state(BlockUnion __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): */ static PyObject *__pyx_f_6pandas_5_libs_6sparse___pyx_unpickle_BlockUnion__set_state(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __pyx_t_5numpy_int32_t __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_BlockUnion__set_state", 0); /* "(tree fragment)":10 * return __pyx_result * cdef __pyx_unpickle_BlockUnion__set_state(BlockUnion __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] # <<<<<<<<<<<<<< * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[11]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.result); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.result)); __pyx_v___pyx_result->__pyx_base.result = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.x); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.x)); __pyx_v___pyx_result->__pyx_base.x = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.xend); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.xend)); __pyx_v___pyx_result->__pyx_base.xend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->__pyx_base.xi = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.xlen); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.xlen)); __pyx_v___pyx_result->__pyx_base.xlen = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.xstart); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.xstart)); __pyx_v___pyx_result->__pyx_base.xstart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.y); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.y)); __pyx_v___pyx_result->__pyx_base.y = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.yend); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.yend)); __pyx_v___pyx_result->__pyx_base.yend = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_npy_int32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->__pyx_base.yi = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.ylen); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.ylen)); __pyx_v___pyx_result->__pyx_base.ylen = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 10, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.ystart); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.ystart)); __pyx_v___pyx_result->__pyx_base.ystart = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":11 * cdef __pyx_unpickle_BlockUnion__set_state(BlockUnion __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[11]) */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 11, __pyx_L1_error) } __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 > 11) != 0); if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 11, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { /* "(tree fragment)":12 * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[11]) # <<<<<<<<<<<<<< */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 12, __pyx_L1_error) } __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_9) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":11 * cdef __pyx_unpickle_BlockUnion__set_state(BlockUnion __pyx_result, tuple __pyx_state): * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[11]) */ } /* "(tree fragment)":9 * __pyx_unpickle_BlockUnion__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BlockUnion__set_state(BlockUnion __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pandas._libs.sparse.__pyx_unpickle_BlockUnion__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":215 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fulfill the PEP. */ /* Python wrapper */ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_i; int __pyx_v_ndim; int __pyx_v_endian_detector; int __pyx_v_little_endian; int __pyx_v_t; char *__pyx_v_f; PyArray_Descr *__pyx_v_descr = 0; int __pyx_v_offset; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; char *__pyx_t_8; if (__pyx_v_info == NULL) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; } __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":222 * * cdef int i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":223 * cdef int i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * * ndim = PyArray_NDIM(self) */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":225 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":228 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not C contiguous") * */ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ if (unlikely(__pyx_t_1)) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 229, __pyx_L1_error) /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":232 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not Fortran contiguous") * */ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L7_bool_binop_done:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ if (unlikely(__pyx_t_1)) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 233, __pyx_L1_error) /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":235 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":236 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":240 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":241 * # This is allocated as one block, strides first. * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":242 * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] */ __pyx_t_4 = __pyx_v_ndim; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":243 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< * info.shape[i] = PyArray_DIMS(self)[i] * else: */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":244 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< * else: * info.strides = PyArray_STRIDES(self) */ (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ goto __pyx_L9; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":246 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ /*else*/ { __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":247 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) */ __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); } __pyx_L9:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":248 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) */ __pyx_v_info->suboffsets = NULL; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":249 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< * info.readonly = not PyArray_ISWRITEABLE(self) * */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":250 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< * * cdef int t */ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":253 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = self.descr * cdef int offset */ __pyx_v_f = NULL; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":254 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef int offset * */ __pyx_t_3 = ((PyObject *)__pyx_v_self->descr); __Pyx_INCREF(__pyx_t_3); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257 * cdef int offset * * info.obj = self # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(descr): */ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259 * info.obj = self * * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); if (__pyx_t_1) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":260 * * if not PyDataType_HASFIELDS(descr): * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): */ __pyx_t_4 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_4; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); if (!__pyx_t_2) { goto __pyx_L15_next_or; } else { } __pyx_t_2 = (__pyx_v_little_endian != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L14_bool_binop_done; } __pyx_L15_next_or:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":262 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L14_bool_binop_done; } __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L14_bool_binop_done:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ if (unlikely(__pyx_t_1)) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 263, __pyx_L1_error) /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":264 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ switch (__pyx_v_t) { case NPY_BYTE: __pyx_v_f = ((char *)"b"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ case NPY_UBYTE: __pyx_v_f = ((char *)"B"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ case NPY_SHORT: __pyx_v_f = ((char *)"h"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":267 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ case NPY_USHORT: __pyx_v_f = ((char *)"H"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ case NPY_INT: __pyx_v_f = ((char *)"i"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":269 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ case NPY_UINT: __pyx_v_f = ((char *)"I"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ case NPY_LONG: __pyx_v_f = ((char *)"l"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ case NPY_ULONG: __pyx_v_f = ((char *)"L"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ case NPY_LONGLONG: __pyx_v_f = ((char *)"q"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":273 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ case NPY_ULONGLONG: __pyx_v_f = ((char *)"Q"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ case NPY_FLOAT: __pyx_v_f = ((char *)"f"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ case NPY_DOUBLE: __pyx_v_f = ((char *)"d"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ case NPY_LONGDOUBLE: __pyx_v_f = ((char *)"g"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":277 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ case NPY_CFLOAT: __pyx_v_f = ((char *)"Zf"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ case NPY_CDOUBLE: __pyx_v_f = ((char *)"Zd"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ case NPY_CLONGDOUBLE: __pyx_v_f = ((char *)"Zg"); break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ case NPY_OBJECT: __pyx_v_f = ((char *)"O"); break; default: /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":282 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 282, __pyx_L1_error) break; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = PyObject_Malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259 * info.obj = self * * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286 * return * else: * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 */ /*else*/ { __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287 * else: * info.format = PyObject_Malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":288 * info.format = PyObject_Malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289 * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_8 = __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_8 == ((char *)NULL))) __PYX_ERR(3, 289, __pyx_L1_error) __pyx_v_f = __pyx_t_8; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = '\x00'; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":215 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fulfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info->obj == Py_None) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":294 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) */ /* Python wrapper */ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":295 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * PyObject_Free(info.strides) */ PyObject_Free(__pyx_v_info->format); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":295 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297 * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * PyObject_Free(info.strides) * # info.shape was stored after info.strides in the same block */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":298 * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * PyObject_Free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ PyObject_Free(__pyx_v_info->strides); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297 * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * PyObject_Free(info.strides) * # info.shape was stored after info.strides in the same block */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":294 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":775 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":775 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":781 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":782 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); __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(3, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":781 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); __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(3, 785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":787 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ static 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) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":788 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline tuple PyDataType_SHAPE(dtype d): */ __Pyx_XDECREF(__pyx_r); __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(3, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":787 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< * return d.subarray.shape * else: */ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); if (__pyx_t_1) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":792 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< * else: * return () */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< * return d.subarray.shape * else: */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":794 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_empty_tuple); __pyx_r = __pyx_empty_tuple; goto __pyx_L0; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":796 * return () * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ static 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) { PyArray_Descr *__pyx_v_child = 0; int __pyx_v_endian_detector; int __pyx_v_little_endian; PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_childname = NULL; PyObject *__pyx_v_new_offset = NULL; PyObject *__pyx_v_t = NULL; char *__pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; long __pyx_t_8; char *__pyx_t_9; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801 * * cdef dtype child * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802 * cdef dtype child * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * cdef tuple fields * */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(__pyx_v_descr->names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(3, 805, __pyx_L1_error) } __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(3, 805, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ if (unlikely(__pyx_v_descr->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(3, 806, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(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(3, 806, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":807 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(__pyx_v_fields != Py_None)) { PyObject* sequence = __pyx_v_fields; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(3, 807, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 807, __pyx_L1_error) } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(3, 807, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); __pyx_t_4 = 0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 809, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); if (unlikely(__pyx_t_6)) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":810 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 810, __pyx_L1_error) /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); if (!__pyx_t_7) { goto __pyx_L8_next_or; } else { } __pyx_t_7 = (__pyx_v_little_endian != 0); if (!__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_L8_next_or:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * # One could encode it in the format string and have Cython */ __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_6 = __pyx_t_7; __pyx_L7_bool_binop_done:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ if (unlikely(__pyx_t_6)) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":814 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 814, __pyx_L1_error) /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __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(3, 824, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 824, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_6) break; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 0x78; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":826 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":829 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_6) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":832 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); __pyx_t_4 = 0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (unlikely(__pyx_t_6)) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(3, 834, __pyx_L1_error) /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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(3, 837, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 837, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __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(3, 838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":839 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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(3, 839, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 839, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x68; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __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(3, 840, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 840, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":841 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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(3, 841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x69; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __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(3, 842, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 842, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":843 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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(3, 843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x6C; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":844 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __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(3, 844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":845 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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(3, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x71; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":846 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __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(3, 846, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 846, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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(3, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x66; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __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(3, 848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x64; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":849 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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(3, 849, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 849, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x67; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":850 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __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(3, 850, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 850, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x66; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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(3, 851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x64; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __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(3, 852, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 852, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x67; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __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(3, 853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(__pyx_t_6)) { (__pyx_v_f[0]) = 79; goto __pyx_L15; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ /*else*/ { __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(3, 855, __pyx_L1_error) } __pyx_L15:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< * else: * # Cython ignores struct boundary information ("T{...}"), */ __pyx_v_f = (__pyx_v_f + 1); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ goto __pyx_L13; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ /*else*/ { __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(3, 860, __pyx_L1_error) __pyx_v_f = __pyx_t_9; } __pyx_L13:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":861 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":796 * return () * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_child); __Pyx_XDECREF(__pyx_v_fields); __Pyx_XDECREF(__pyx_v_childname); __Pyx_XDECREF(__pyx_v_new_offset); __Pyx_XDECREF(__pyx_v_t); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":977 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { PyObject *__pyx_v_baseptr; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("set_array_base", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":979 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< * baseptr = NULL * else: */ __pyx_t_1 = (__pyx_v_base == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":980 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< * else: * Py_INCREF(base) # important to do this before decref below! */ __pyx_v_baseptr = NULL; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":979 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< * baseptr = NULL * else: */ goto __pyx_L3; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":982 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< * baseptr = base * Py_XDECREF(arr.base) */ /*else*/ { Py_INCREF(__pyx_v_base); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":983 * else: * Py_INCREF(base) # important to do this before decref below! * baseptr = base # <<<<<<<<<<<<<< * Py_XDECREF(arr.base) * arr.base = baseptr */ __pyx_v_baseptr = ((PyObject *)__pyx_v_base); } __pyx_L3:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":984 * Py_INCREF(base) # important to do this before decref below! * baseptr = base * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< * arr.base = baseptr * */ Py_XDECREF(__pyx_v_arr->base); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":985 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ __pyx_v_arr->base = __pyx_v_baseptr; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":977 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * cdef PyObject* baseptr * if base is None: */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":987 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":988 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< * return None * else: */ __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); if (__pyx_t_1) { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":989 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< * else: * return arr.base */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":988 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< * return None * else: */ } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":991 * return None * else: * return arr.base # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); __pyx_r = ((PyObject *)__pyx_v_arr->base); goto __pyx_L0; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":987 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * if arr.base is NULL: * return None */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":996 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< * try: * _import_array() */ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_array", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< * _import_array() * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":998 * cdef inline int import_array() except -1: * try: * _import_array() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.multiarray failed to import") */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 998, __pyx_L3_error) /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< * _import_array() * except Exception: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":999 * try: * _import_array() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.multiarray failed to import") * */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 999, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1000 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1000, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(3, 1000, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< * _import_array() * except Exception: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":996 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< * try: * _import_array() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1002 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_umath", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1003 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1004 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1004, __pyx_L3_error) /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1003 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1005 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.umath failed to import") * */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1005, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1006 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1006, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(3, 1006, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1003 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1002 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1008 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_ufunc", 0); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1010 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1010, __pyx_L3_error) /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1011 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.umath failed to import") */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1011, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1012 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1012, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(3, 1012, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1008 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_SparseIndex(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_6pandas_5_libs_6sparse_SparseIndex(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_6pandas_5_libs_6sparse_SparseIndex[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_11SparseIndex_3__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_11SparseIndex_5__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5_libs_6sparse_SparseIndex = { PyVarObject_HEAD_INIT(0, 0) "pandas._libs.sparse.SparseIndex", /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5_libs_6sparse_SparseIndex, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Abstract superclass for sparse index types.\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5_libs_6sparse_SparseIndex, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_5_libs_6sparse_11SparseIndex_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5_libs_6sparse_SparseIndex, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5_libs_6sparse_IntIndex __pyx_vtable_6pandas_5_libs_6sparse_IntIndex; static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_IntIndex(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *p; PyObject *o = __pyx_tp_new_6pandas_5_libs_6sparse_SparseIndex(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6sparse_IntIndex; p->indices = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5_libs_6sparse_IntIndex(PyObject *o) { struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *p = (struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->indices); #if CYTHON_USE_TYPE_SLOTS if (PyType_IS_GC(Py_TYPE(o)->tp_base)) #endif PyObject_GC_Track(o); __pyx_tp_dealloc_6pandas_5_libs_6sparse_SparseIndex(o); } static int __pyx_tp_traverse_6pandas_5_libs_6sparse_IntIndex(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *p = (struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)o; e = ((likely(__pyx_ptype_6pandas_5_libs_6sparse_SparseIndex)) ? ((__pyx_ptype_6pandas_5_libs_6sparse_SparseIndex->tp_traverse) ? __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6pandas_5_libs_6sparse_IntIndex)); if (e) return e; if (p->indices) { e = (*v)(((PyObject *)p->indices), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5_libs_6sparse_IntIndex(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *p = (struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *)o; if (likely(__pyx_ptype_6pandas_5_libs_6sparse_SparseIndex)) { if (__pyx_ptype_6pandas_5_libs_6sparse_SparseIndex->tp_clear) __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6pandas_5_libs_6sparse_IntIndex); tmp = ((PyObject*)p->indices); p->indices = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_5_libs_6sparse_8IntIndex_ngaps(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5_libs_6sparse_8IntIndex_5ngaps_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5_libs_6sparse_8IntIndex_length(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5_libs_6sparse_8IntIndex_6length_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5_libs_6sparse_8IntIndex_npoints(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5_libs_6sparse_8IntIndex_7npoints_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5_libs_6sparse_8IntIndex_indices(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5_libs_6sparse_8IntIndex_7indices_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_5_libs_6sparse_IntIndex[] = { {"__reduce__", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_3__reduce__, METH_NOARGS, 0}, {"check_integrity", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_7check_integrity, METH_NOARGS, __pyx_doc_6pandas_5_libs_6sparse_8IntIndex_6check_integrity}, {"equals", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_9equals, METH_O, 0}, {"to_int_index", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_11to_int_index, METH_NOARGS, 0}, {"to_block_index", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_13to_block_index, METH_NOARGS, 0}, {"intersect", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_15intersect, METH_O, 0}, {"make_union", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_17make_union, METH_O, 0}, {"lookup", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_19lookup, METH_O, __pyx_doc_6pandas_5_libs_6sparse_8IntIndex_18lookup}, {"lookup_array", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_21lookup_array, METH_O, __pyx_doc_6pandas_5_libs_6sparse_8IntIndex_20lookup_array}, {"reindex", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_23reindex, METH_VARARGS|METH_KEYWORDS, 0}, {"put", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_25put, METH_VARARGS|METH_KEYWORDS, 0}, {"take", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_8IntIndex_27take, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6sparse_IntIndex[] = { {(char *)"ngaps", __pyx_getprop_6pandas_5_libs_6sparse_8IntIndex_ngaps, 0, (char *)0, 0}, {(char *)"length", __pyx_getprop_6pandas_5_libs_6sparse_8IntIndex_length, 0, (char *)0, 0}, {(char *)"npoints", __pyx_getprop_6pandas_5_libs_6sparse_8IntIndex_npoints, 0, (char *)0, 0}, {(char *)"indices", __pyx_getprop_6pandas_5_libs_6sparse_8IntIndex_indices, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5_libs_6sparse_IntIndex = { PyVarObject_HEAD_INIT(0, 0) "pandas._libs.sparse.IntIndex", /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5_libs_6sparse_IntIndex, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6pandas_5_libs_6sparse_8IntIndex_5__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n Object for holding exact integer sparse indexing information\n\n Parameters\n ----------\n length : integer\n indices : array-like\n Contains integers corresponding to the indices.\n ", /*tp_doc*/ __pyx_tp_traverse_6pandas_5_libs_6sparse_IntIndex, /*tp_traverse*/ __pyx_tp_clear_6pandas_5_libs_6sparse_IntIndex, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5_libs_6sparse_IntIndex, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_5_libs_6sparse_IntIndex, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_5_libs_6sparse_8IntIndex_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5_libs_6sparse_IntIndex, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIndex __pyx_vtable_6pandas_5_libs_6sparse_BlockIndex; static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_BlockIndex(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *p; PyObject *o = __pyx_tp_new_6pandas_5_libs_6sparse_SparseIndex(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6sparse_BlockIndex; p->blocs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->blengths = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5_libs_6sparse_BlockIndex(PyObject *o) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *p = (struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); if (p->__weakref__) PyObject_ClearWeakRefs(o); Py_CLEAR(p->blocs); Py_CLEAR(p->blengths); #if CYTHON_USE_TYPE_SLOTS if (PyType_IS_GC(Py_TYPE(o)->tp_base)) #endif PyObject_GC_Track(o); __pyx_tp_dealloc_6pandas_5_libs_6sparse_SparseIndex(o); } static int __pyx_tp_traverse_6pandas_5_libs_6sparse_BlockIndex(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *p = (struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)o; e = ((likely(__pyx_ptype_6pandas_5_libs_6sparse_SparseIndex)) ? ((__pyx_ptype_6pandas_5_libs_6sparse_SparseIndex->tp_traverse) ? __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6pandas_5_libs_6sparse_BlockIndex)); if (e) return e; if (p->blocs) { e = (*v)(((PyObject *)p->blocs), a); if (e) return e; } if (p->blengths) { e = (*v)(((PyObject *)p->blengths), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5_libs_6sparse_BlockIndex(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *p = (struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)o; if (likely(__pyx_ptype_6pandas_5_libs_6sparse_SparseIndex)) { if (__pyx_ptype_6pandas_5_libs_6sparse_SparseIndex->tp_clear) __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6pandas_5_libs_6sparse_BlockIndex); tmp = ((PyObject*)p->blocs); p->blocs = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->blengths); p->blengths = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_ngaps(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_5ngaps_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_nblocks(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7nblocks_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_npoints(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7npoints_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_length(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_6length_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_blocs(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_5blocs_1__get__(o); } static PyObject *__pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_blengths(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_8blengths_1__get__(o); } static PyMethodDef __pyx_methods_6pandas_5_libs_6sparse_BlockIndex[] = { {"__reduce__", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_3__reduce__, METH_NOARGS, 0}, {"check_integrity", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_7check_integrity, METH_NOARGS, __pyx_doc_6pandas_5_libs_6sparse_10BlockIndex_6check_integrity}, {"equals", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_9equals, METH_O, 0}, {"to_block_index", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_11to_block_index, METH_NOARGS, 0}, {"to_int_index", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_13to_int_index, METH_NOARGS, 0}, {"intersect", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_15intersect, METH_O, __pyx_doc_6pandas_5_libs_6sparse_10BlockIndex_14intersect}, {"make_union", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_17make_union, METH_O, __pyx_doc_6pandas_5_libs_6sparse_10BlockIndex_16make_union}, {"lookup", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_19lookup, METH_O, __pyx_doc_6pandas_5_libs_6sparse_10BlockIndex_18lookup}, {"lookup_array", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_21lookup_array, METH_O, __pyx_doc_6pandas_5_libs_6sparse_10BlockIndex_20lookup_array}, {"reindex", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_23reindex, METH_VARARGS|METH_KEYWORDS, 0}, {"put", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_25put, METH_VARARGS|METH_KEYWORDS, 0}, {"take", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_27take, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6pandas_5_libs_6sparse_BlockIndex[] = { {(char *)"ngaps", __pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_ngaps, 0, (char *)0, 0}, {(char *)"nblocks", __pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_nblocks, 0, (char *)0, 0}, {(char *)"npoints", __pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_npoints, 0, (char *)0, 0}, {(char *)"length", __pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_length, 0, (char *)0, 0}, {(char *)"blocs", __pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_blocs, 0, (char *)0, 0}, {(char *)"blengths", __pyx_getprop_6pandas_5_libs_6sparse_10BlockIndex_blengths, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5_libs_6sparse_BlockIndex = { PyVarObject_HEAD_INIT(0, 0) "pandas._libs.sparse.BlockIndex", /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5_libs_6sparse_BlockIndex, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_5__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n Object for holding block-based sparse indexing information\n\n Parameters\n ----------\n ", /*tp_doc*/ __pyx_tp_traverse_6pandas_5_libs_6sparse_BlockIndex, /*tp_traverse*/ __pyx_tp_clear_6pandas_5_libs_6sparse_BlockIndex, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5_libs_6sparse_BlockIndex, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6pandas_5_libs_6sparse_BlockIndex, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_5_libs_6sparse_10BlockIndex_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5_libs_6sparse_BlockIndex, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockMerge __pyx_vtable_6pandas_5_libs_6sparse_BlockMerge; static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_BlockMerge(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)o); p->__pyx_vtab = __pyx_vtabptr_6pandas_5_libs_6sparse_BlockMerge; p->x = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); p->y = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); p->result = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); p->xstart = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->xlen = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->xend = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->ystart = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->ylen = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); p->yend = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6pandas_5_libs_6sparse_BlockMerge(PyObject *o) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *p = (struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->x); Py_CLEAR(p->y); Py_CLEAR(p->result); Py_CLEAR(p->xstart); Py_CLEAR(p->xlen); Py_CLEAR(p->xend); Py_CLEAR(p->ystart); Py_CLEAR(p->ylen); Py_CLEAR(p->yend); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6pandas_5_libs_6sparse_BlockMerge(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *p = (struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)o; if (p->x) { e = (*v)(((PyObject *)p->x), a); if (e) return e; } if (p->y) { e = (*v)(((PyObject *)p->y), a); if (e) return e; } if (p->result) { e = (*v)(((PyObject *)p->result), a); if (e) return e; } if (p->xstart) { e = (*v)(((PyObject *)p->xstart), a); if (e) return e; } if (p->xlen) { e = (*v)(((PyObject *)p->xlen), a); if (e) return e; } if (p->xend) { e = (*v)(((PyObject *)p->xend), a); if (e) return e; } if (p->ystart) { e = (*v)(((PyObject *)p->ystart), a); if (e) return e; } if (p->ylen) { e = (*v)(((PyObject *)p->ylen), a); if (e) return e; } if (p->yend) { e = (*v)(((PyObject *)p->yend), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6pandas_5_libs_6sparse_BlockMerge(PyObject *o) { PyObject* tmp; struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *p = (struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *)o; tmp = ((PyObject*)p->x); p->x = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->y); p->y = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->result); p->result = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->xstart); p->xstart = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->xlen); p->xlen = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->xend); p->xend = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->ystart); p->ystart = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->ylen); p->ylen = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->yend); p->yend = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6pandas_5_libs_6sparse_BlockMerge[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_3__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_5__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5_libs_6sparse_BlockMerge = { PyVarObject_HEAD_INIT(0, 0) "pandas._libs.sparse.BlockMerge", /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5_libs_6sparse_BlockMerge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n Object-oriented approach makes sharing state between recursive functions a\n lot easier and reduces code duplication\n ", /*tp_doc*/ __pyx_tp_traverse_6pandas_5_libs_6sparse_BlockMerge, /*tp_traverse*/ __pyx_tp_clear_6pandas_5_libs_6sparse_BlockMerge, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5_libs_6sparse_BlockMerge, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5_libs_6sparse_BlockMerge, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockIntersection __pyx_vtable_6pandas_5_libs_6sparse_BlockIntersection; static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_BlockIntersection(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *p; PyObject *o = __pyx_tp_new_6pandas_5_libs_6sparse_BlockMerge(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockMerge*)__pyx_vtabptr_6pandas_5_libs_6sparse_BlockIntersection; return o; } static PyMethodDef __pyx_methods_6pandas_5_libs_6sparse_BlockIntersection[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_17BlockIntersection_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_17BlockIntersection_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5_libs_6sparse_BlockIntersection = { PyVarObject_HEAD_INIT(0, 0) "pandas._libs.sparse.BlockIntersection", /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIntersection), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5_libs_6sparse_BlockMerge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n not done yet\n ", /*tp_doc*/ __pyx_tp_traverse_6pandas_5_libs_6sparse_BlockMerge, /*tp_traverse*/ __pyx_tp_clear_6pandas_5_libs_6sparse_BlockMerge, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5_libs_6sparse_BlockIntersection, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5_libs_6sparse_BlockIntersection, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockUnion __pyx_vtable_6pandas_5_libs_6sparse_BlockUnion; static PyObject *__pyx_tp_new_6pandas_5_libs_6sparse_BlockUnion(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *p; PyObject *o = __pyx_tp_new_6pandas_5_libs_6sparse_BlockMerge(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6pandas_5_libs_6sparse_BlockMerge*)__pyx_vtabptr_6pandas_5_libs_6sparse_BlockUnion; return o; } static PyMethodDef __pyx_methods_6pandas_5_libs_6sparse_BlockUnion[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockUnion_1__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_10BlockUnion_3__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6pandas_5_libs_6sparse_BlockUnion = { PyVarObject_HEAD_INIT(0, 0) "pandas._libs.sparse.BlockUnion", /*tp_name*/ sizeof(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pandas_5_libs_6sparse_BlockMerge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n Object-oriented approach makes sharing state between recursive functions a\n lot easier and reduces code duplication\n ", /*tp_doc*/ __pyx_tp_traverse_6pandas_5_libs_6sparse_BlockMerge, /*tp_traverse*/ __pyx_tp_clear_6pandas_5_libs_6sparse_BlockMerge, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6pandas_5_libs_6sparse_BlockUnion, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6pandas_5_libs_6sparse_10BlockMerge_1__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6pandas_5_libs_6sparse_BlockUnion, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {"get_blocks", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_1get_blocks, METH_O, 0}, {"sparse_add_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_3sparse_add_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_add_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_5sparse_fill_add_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_add_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_7sparse_add_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_add_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_9sparse_fill_add_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_sub_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_11sparse_sub_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_sub_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_13sparse_fill_sub_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_sub_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_15sparse_sub_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_sub_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_17sparse_fill_sub_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_mul_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_19sparse_mul_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_mul_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_21sparse_fill_mul_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_mul_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_23sparse_mul_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_mul_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_25sparse_fill_mul_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_div_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_27sparse_div_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_div_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_29sparse_fill_div_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_div_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_31sparse_div_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_div_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_33sparse_fill_div_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_mod_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_35sparse_mod_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_mod_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_37sparse_fill_mod_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_mod_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_39sparse_mod_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_mod_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_41sparse_fill_mod_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_truediv_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_43sparse_truediv_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_truediv_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_45sparse_fill_truediv_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_truediv_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_47sparse_truediv_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_truediv_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_49sparse_fill_truediv_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_floordiv_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_51sparse_floordiv_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_floordiv_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_53sparse_fill_floordiv_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_floordiv_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_55sparse_floordiv_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_floordiv_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_57sparse_fill_floordiv_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_pow_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_59sparse_pow_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_pow_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_61sparse_fill_pow_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_pow_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_63sparse_pow_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_pow_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_65sparse_fill_pow_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_eq_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_67sparse_eq_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_eq_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_69sparse_fill_eq_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_eq_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_71sparse_eq_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_eq_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_73sparse_fill_eq_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_ne_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_75sparse_ne_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_ne_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_77sparse_fill_ne_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_ne_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_79sparse_ne_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_ne_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_81sparse_fill_ne_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_lt_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_83sparse_lt_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_lt_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_85sparse_fill_lt_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_lt_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_87sparse_lt_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_lt_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_89sparse_fill_lt_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_gt_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_91sparse_gt_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_gt_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_93sparse_fill_gt_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_gt_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_95sparse_gt_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_gt_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_97sparse_fill_gt_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_le_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_99sparse_le_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_le_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_101sparse_fill_le_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_le_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_103sparse_le_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_le_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_105sparse_fill_le_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_ge_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_107sparse_ge_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_ge_float64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_109sparse_fill_ge_float64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_ge_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_111sparse_ge_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_ge_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_113sparse_fill_ge_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_and_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_115sparse_and_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_and_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_117sparse_fill_and_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_and_uint8", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_119sparse_and_uint8, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_and_uint8", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_121sparse_fill_and_uint8, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_or_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_123sparse_or_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_or_int64", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_125sparse_fill_or_int64, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_or_uint8", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_127sparse_or_uint8, METH_VARARGS|METH_KEYWORDS, 0}, {"sparse_fill_or_uint8", (PyCFunction)__pyx_pw_6pandas_5_libs_6sparse_129sparse_fill_or_uint8, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_sparse(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_sparse}, {0, NULL} }; #endif static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, "sparse", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_1_10, __pyx_k_1_10, sizeof(__pyx_k_1_10), 0, 0, 1, 0}, {&__pyx_kp_s_1_11, __pyx_k_1_11, sizeof(__pyx_k_1_11), 0, 0, 1, 0}, {&__pyx_kp_s_All_indices_must_be_less_than_th, __pyx_k_All_indices_must_be_less_than_th, sizeof(__pyx_k_All_indices_must_be_less_than_th), 0, 0, 1, 0}, {&__pyx_n_s_BlockIndex, __pyx_k_BlockIndex, sizeof(__pyx_k_BlockIndex), 0, 0, 1, 1}, {&__pyx_kp_s_Block_d_extends_beyond_end, __pyx_k_Block_d_extends_beyond_end, sizeof(__pyx_k_Block_d_extends_beyond_end), 0, 0, 1, 0}, {&__pyx_kp_s_Block_d_overlaps, __pyx_k_Block_d_overlaps, sizeof(__pyx_k_Block_d_overlaps), 0, 0, 1, 0}, {&__pyx_kp_s_Block_lengths_s, __pyx_k_Block_lengths_s, sizeof(__pyx_k_Block_lengths_s), 0, 0, 1, 0}, {&__pyx_kp_s_Block_locations_s, __pyx_k_Block_locations_s, sizeof(__pyx_k_Block_locations_s), 0, 0, 1, 0}, {&__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}, {&__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}, {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x0c, __pyx_k_Incompatible_checksums_s_vs_0x0c, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x0c), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0}, {&__pyx_kp_s_Indices_must_be_strictly_increas, __pyx_k_Indices_must_be_strictly_increas, sizeof(__pyx_k_Indices_must_be_strictly_increas), 0, 0, 1, 0}, {&__pyx_kp_s_Indices_must_reference_same_unde, __pyx_k_Indices_must_reference_same_unde, sizeof(__pyx_k_Indices_must_reference_same_unde), 0, 0, 1, 0}, {&__pyx_kp_s_Indices_s, __pyx_k_Indices_s, sizeof(__pyx_k_Indices_s), 0, 0, 1, 0}, {&__pyx_n_s_IntIndex, __pyx_k_IntIndex, sizeof(__pyx_k_IntIndex), 0, 0, 1, 1}, {&__pyx_kp_s_Locations_not_in_ascending_order, __pyx_k_Locations_not_in_ascending_order, sizeof(__pyx_k_Locations_not_in_ascending_order), 0, 0, 1, 0}, {&__pyx_n_s_LooseVersion, __pyx_k_LooseVersion, sizeof(__pyx_k_LooseVersion), 0, 0, 1, 1}, {&__pyx_kp_s_Mode_must_be_0_or_1, __pyx_k_Mode_must_be_0_or_1, sizeof(__pyx_k_Mode_must_be_0_or_1), 0, 0, 1, 0}, {&__pyx_n_s_NaN, __pyx_k_NaN, sizeof(__pyx_k_NaN), 0, 0, 1, 1}, {&__pyx_kp_s_No_index_can_be_less_than_zero, __pyx_k_No_index_can_be_less_than_zero, sizeof(__pyx_k_No_index_can_be_less_than_zero), 0, 0, 1, 0}, {&__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}, {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_kp_s_Too_many_indices_Expected_exp_bu, __pyx_k_Too_many_indices_Expected_exp_bu, sizeof(__pyx_k_Too_many_indices_Expected_exp_bu), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_kp_s_Zero_length_block_d, __pyx_k_Zero_length_block_d, sizeof(__pyx_k_Zero_length_block_d), 0, 0, 1, 0}, {&__pyx_n_s_act, __pyx_k_act, sizeof(__pyx_k_act), 0, 0, 1, 1}, {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1}, {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1}, {&__pyx_n_s_array_equal, __pyx_k_array_equal, sizeof(__pyx_k_array_equal), 0, 0, 1, 1}, {&__pyx_n_s_ascontiguousarray, __pyx_k_ascontiguousarray, sizeof(__pyx_k_ascontiguousarray), 0, 0, 1, 1}, {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1}, {&__pyx_n_s_blengths, __pyx_k_blengths, sizeof(__pyx_k_blengths), 0, 0, 1, 1}, {&__pyx_kp_s_block_bound_arrays_must_be_same, __pyx_k_block_bound_arrays_must_be_same, sizeof(__pyx_k_block_bound_arrays_must_be_same), 0, 0, 1, 0}, {&__pyx_n_s_blocs, __pyx_k_blocs, sizeof(__pyx_k_blocs), 0, 0, 1, 1}, {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1}, {&__pyx_n_s_check_integrity, __pyx_k_check_integrity, sizeof(__pyx_k_check_integrity), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_n_s_distutils_version, __pyx_k_distutils_version, sizeof(__pyx_k_distutils_version), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1}, {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1}, {&__pyx_n_s_fill_value, __pyx_k_fill_value, sizeof(__pyx_k_fill_value), 0, 0, 1, 1}, {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_get_reindexer, __pyx_k_get_reindexer, sizeof(__pyx_k_get_reindexer), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_index_map, __pyx_k_index_map, sizeof(__pyx_k_index_map), 0, 0, 1, 1}, {&__pyx_n_s_indexer, __pyx_k_indexer, sizeof(__pyx_k_indexer), 0, 0, 1, 1}, {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1}, {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1}, {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1}, {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1}, {&__pyx_n_s_int8, __pyx_k_int8, sizeof(__pyx_k_int8), 0, 0, 1, 1}, {&__pyx_n_s_intersect, __pyx_k_intersect, sizeof(__pyx_k_intersect), 0, 0, 1, 1}, {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1}, {&__pyx_n_s_lookup, __pyx_k_lookup, sizeof(__pyx_k_lookup), 0, 0, 1, 1}, {&__pyx_n_s_lookup_array, __pyx_k_lookup_array, sizeof(__pyx_k_lookup_array), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_make_mask_object_ndarray, __pyx_k_make_mask_object_ndarray, sizeof(__pyx_k_make_mask_object_ndarray), 0, 0, 1, 1}, {&__pyx_n_s_make_union, __pyx_k_make_union, sizeof(__pyx_k_make_union), 0, 0, 1, 1}, {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1}, {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1}, {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__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}, {&__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}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, {&__pyx_n_s_new_length, __pyx_k_new_length, sizeof(__pyx_k_new_length), 0, 0, 1, 1}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_np_version, __pyx_k_np_version, sizeof(__pyx_k_np_version), 0, 0, 1, 1}, {&__pyx_n_s_np_version_under1p10, __pyx_k_np_version_under1p10, sizeof(__pyx_k_np_version_under1p10), 0, 0, 1, 1}, {&__pyx_n_s_np_version_under1p11, __pyx_k_np_version_under1p11, sizeof(__pyx_k_np_version_under1p11), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__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}, {&__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}, {&__pyx_n_s_ones, __pyx_k_ones, sizeof(__pyx_k_ones), 0, 0, 1, 1}, {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1}, {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1}, {&__pyx_n_s_pandas__libs_sparse, __pyx_k_pandas__libs_sparse, sizeof(__pyx_k_pandas__libs_sparse), 0, 0, 1, 1}, {&__pyx_kp_s_pandas__libs_sparse_pyx, __pyx_k_pandas__libs_sparse_pyx, sizeof(__pyx_k_pandas__libs_sparse_pyx), 0, 0, 1, 0}, {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, {&__pyx_n_s_put, __pyx_k_put, sizeof(__pyx_k_put), 0, 0, 1, 1}, {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1}, {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_BlockIntersection, __pyx_k_pyx_unpickle_BlockIntersection, sizeof(__pyx_k_pyx_unpickle_BlockIntersection), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_BlockMerge, __pyx_k_pyx_unpickle_BlockMerge, sizeof(__pyx_k_pyx_unpickle_BlockMerge), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_BlockUnion, __pyx_k_pyx_unpickle_BlockUnion, sizeof(__pyx_k_pyx_unpickle_BlockUnion), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_SparseIndex, __pyx_k_pyx_unpickle_SparseIndex, sizeof(__pyx_k_pyx_unpickle_SparseIndex), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, {&__pyx_n_s_reindex, __pyx_k_reindex, sizeof(__pyx_k_reindex), 0, 0, 1, 1}, {&__pyx_n_s_reindex_integer, __pyx_k_reindex_integer, sizeof(__pyx_k_reindex_integer), 0, 0, 1, 1}, {&__pyx_n_s_searchsorted, __pyx_k_searchsorted, sizeof(__pyx_k_searchsorted), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_short_version, __pyx_k_short_version, sizeof(__pyx_k_short_version), 0, 0, 1, 1}, {&__pyx_n_s_sparse_index, __pyx_k_sparse_index, sizeof(__pyx_k_sparse_index), 0, 0, 1, 1}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_take, __pyx_k_take, sizeof(__pyx_k_take), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_to_block_index, __pyx_k_to_block_index, sizeof(__pyx_k_to_block_index), 0, 0, 1, 1}, {&__pyx_n_s_to_int_index, __pyx_k_to_int_index, sizeof(__pyx_k_to_int_index), 0, 0, 1, 1}, {&__pyx_n_s_to_put, __pyx_k_to_put, sizeof(__pyx_k_to_put), 0, 0, 1, 1}, {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 0, 1, 1}, {&__pyx_n_s_union1d, __pyx_k_union1d, sizeof(__pyx_k_union1d), 0, 0, 1, 1}, {&__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}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1}, {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_s_xfill, __pyx_k_xfill, sizeof(__pyx_k_xfill), 0, 0, 1, 1}, {&__pyx_n_s_xindex, __pyx_k_xindex, sizeof(__pyx_k_xindex), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {&__pyx_n_s_yfill, __pyx_k_yfill, sizeof(__pyx_k_yfill), 0, 0, 1, 1}, {&__pyx_n_s_yindex, __pyx_k_yindex, sizeof(__pyx_k_yindex), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 40, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 92, __pyx_L1_error) __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) __PYX_ERR(0, 99, __pyx_L1_error) __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 102, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 809, __pyx_L1_error) __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(3, 810, __pyx_L1_error) __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(3, 1000, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "pandas/_libs/sparse.pyx":100 * * if min(self.indices) < 0: * raise ValueError("No index can be less than zero") # <<<<<<<<<<<<<< * * if max(self.indices) >= self.length: */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_No_index_can_be_less_than_zero); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "pandas/_libs/sparse.pyx":103 * * if max(self.indices) >= self.length: * raise ValueError("All indices must be less than the length") # <<<<<<<<<<<<<< * * for index in self.indices: */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_All_indices_must_be_less_than_th); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "pandas/_libs/sparse.pyx":107 * for index in self.indices: * if prev != -1 and index <= prev: * raise ValueError("Indices must be strictly increasing") # <<<<<<<<<<<<<< * * prev = index */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Indices_must_be_strictly_increas); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "pandas/_libs/sparse.pyx":144 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xindices = self.indices */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_Indices_must_reference_same_unde); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "pandas/_libs/sparse.pyx":178 * * if self.length != y.length: * raise ValueError('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * new_indices = np.union1d(self.indices, y.indices) */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Indices_must_reference_same_unde); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pandas/_libs/sparse.pyx":223 * n = len(indexer) * results = np.empty(n, dtype=np.int32) * results.fill(-1) # <<<<<<<<<<<<<< * * if self.npoints == 0: */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pandas/_libs/sparse.pyx":384 * * if len(blocs) != len(blengths): * raise ValueError('block bound arrays must be same length') # <<<<<<<<<<<<<< * * for i from 0 <= i < self.nblocks: */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_block_bound_arrays_must_be_same); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "pandas/_libs/sparse.pyx":389 * if i > 0: * if blocs[i] <= blocs[i - 1]: * raise ValueError('Locations not in ascending order') # <<<<<<<<<<<<<< * * if i < self.nblocks - 1: */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Locations_not_in_ascending_order); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "pandas/_libs/sparse.pyx":454 * * if self.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * xloc = self.blocs */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Indices_must_reference_same_unde); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "pandas/_libs/sparse.pyx":577 * n = len(indexer) * results = np.empty(n, dtype=np.int32) * results.fill(-1) # <<<<<<<<<<<<<< * * if self.npoints == 0: */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "pandas/_libs/sparse.pyx":640 * * if x.length != y.length: * raise Exception('Indices must reference same underlying length') # <<<<<<<<<<<<<< * * self.xstart = self.x.blocs */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Indices_must_reference_same_unde); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "pandas/_libs/sparse.pyx":739 * * if mode != 0 and mode != 1: * raise Exception('Mode must be 0 or 1') # <<<<<<<<<<<<<< * * # so symmetric code will work */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_Mode_must_be_0_or_1); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(3, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(3, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(3, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":810 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(3, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":814 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(3, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(3, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1000 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(3, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1006 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(3, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1012 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(3, 1012, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "pandas/_libs/sparse.pyx":18 * # numpy versioning * _np_version = np.version.short_version * _np_version_under1p10 = LooseVersion(_np_version) < LooseVersion('1.10') # <<<<<<<<<<<<<< * _np_version_under1p11 = LooseVersion(_np_version) < LooseVersion('1.11') * */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_1_10); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "pandas/_libs/sparse.pyx":19 * _np_version = np.version.short_version * _np_version_under1p10 = LooseVersion(_np_version) < LooseVersion('1.10') * _np_version_under1p11 = LooseVersion(_np_version) < LooseVersion('1.11') # <<<<<<<<<<<<<< * * */ __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_1_11); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "pandas/_libs/sparse.pyx":801 * # Indexing operations * * def get_reindexer(ndarray[object, ndim=1] values, dict index_map): # <<<<<<<<<<<<<< * cdef object idx * cdef Py_ssize_t i */ __pyx_tuple__24 = PyTuple_Pack(6, __pyx_n_s_values, __pyx_n_s_index_map, __pyx_n_s_idx, __pyx_n_s_i, __pyx_n_s_new_length, __pyx_n_s_indexer); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_sparse_pyx, __pyx_n_s_get_reindexer, 801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 801, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":848 * * * def reindex_integer(ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * IntIndex sparse_index, * ndarray[int32_t, ndim=1] indexer): */ __pyx_tuple__26 = PyTuple_Pack(3, __pyx_n_s_values, __pyx_n_s_sparse_index, __pyx_n_s_indexer); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_sparse_pyx, __pyx_n_s_reindex_integer, 848, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 848, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":857 * # SparseArray mask create operations * * def make_mask_object_ndarray(ndarray[object, ndim=1] arr, object fill_value): # <<<<<<<<<<<<<< * cdef object value * cdef Py_ssize_t i */ __pyx_tuple__28 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_fill_value, __pyx_n_s_value, __pyx_n_s_i, __pyx_n_s_new_length, __pyx_n_s_mask); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pandas__libs_sparse_pyx, __pyx_n_s_make_mask_object_ndarray, 857, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 857, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_SparseIndex(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError */ __pyx_tuple__30 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SparseIndex, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_tuple__32 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BlockMerge, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_tuple__34 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BlockIntersection, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_tuple__36 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BlockUnion, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_13526932 = PyInt_FromLong(13526932L); if (unlikely(!__pyx_int_13526932)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static int __Pyx_modinit_global_init_code(void); /*proto*/ static int __Pyx_modinit_variable_export_code(void); /*proto*/ static int __Pyx_modinit_function_export_code(void); /*proto*/ static int __Pyx_modinit_type_init_code(void); /*proto*/ static int __Pyx_modinit_type_import_code(void); /*proto*/ static int __Pyx_modinit_variable_import_code(void); /*proto*/ static int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_6pandas_5_libs_6sparse_SparseIndex) < 0) __PYX_ERR(0, 34, __pyx_L1_error) __pyx_type_6pandas_5_libs_6sparse_SparseIndex.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6sparse_SparseIndex.tp_dictoffset && __pyx_type_6pandas_5_libs_6sparse_SparseIndex.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6pandas_5_libs_6sparse_SparseIndex.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttrString(__pyx_m, "SparseIndex", (PyObject *)&__pyx_type_6pandas_5_libs_6sparse_SparseIndex) < 0) __PYX_ERR(0, 34, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pandas_5_libs_6sparse_SparseIndex) < 0) __PYX_ERR(0, 34, __pyx_L1_error) __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex = &__pyx_type_6pandas_5_libs_6sparse_SparseIndex; __pyx_vtabptr_6pandas_5_libs_6sparse_IntIndex = &__pyx_vtable_6pandas_5_libs_6sparse_IntIndex; __pyx_vtable_6pandas_5_libs_6sparse_IntIndex.intersect = (struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_8IntIndex_intersect; __pyx_vtable_6pandas_5_libs_6sparse_IntIndex.make_union = (struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_8IntIndex_make_union; __pyx_vtable_6pandas_5_libs_6sparse_IntIndex.lookup = (__pyx_t_5numpy_int32_t (*)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_8IntIndex_lookup; __pyx_vtable_6pandas_5_libs_6sparse_IntIndex.lookup_array = (PyArrayObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_8IntIndex_lookup_array; __pyx_vtable_6pandas_5_libs_6sparse_IntIndex.reindex = (PyArrayObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_8IntIndex_reindex; __pyx_vtable_6pandas_5_libs_6sparse_IntIndex.put = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_8IntIndex_put; __pyx_vtable_6pandas_5_libs_6sparse_IntIndex.take = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_IntIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_8IntIndex_take; __pyx_type_6pandas_5_libs_6sparse_IntIndex.tp_base = __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex; if (PyType_Ready(&__pyx_type_6pandas_5_libs_6sparse_IntIndex) < 0) __PYX_ERR(0, 43, __pyx_L1_error) __pyx_type_6pandas_5_libs_6sparse_IntIndex.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6sparse_IntIndex.tp_dictoffset && __pyx_type_6pandas_5_libs_6sparse_IntIndex.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6pandas_5_libs_6sparse_IntIndex.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6sparse_IntIndex.tp_dict, __pyx_vtabptr_6pandas_5_libs_6sparse_IntIndex) < 0) __PYX_ERR(0, 43, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "IntIndex", (PyObject *)&__pyx_type_6pandas_5_libs_6sparse_IntIndex) < 0) __PYX_ERR(0, 43, __pyx_L1_error) __pyx_ptype_6pandas_5_libs_6sparse_IntIndex = &__pyx_type_6pandas_5_libs_6sparse_IntIndex; __pyx_vtabptr_6pandas_5_libs_6sparse_BlockIndex = &__pyx_vtable_6pandas_5_libs_6sparse_BlockIndex; __pyx_vtable_6pandas_5_libs_6sparse_BlockIndex.check_integrity = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_check_integrity; __pyx_vtable_6pandas_5_libs_6sparse_BlockIndex.intersect = (struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_intersect; __pyx_vtable_6pandas_5_libs_6sparse_BlockIndex.make_union = (struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_make_union; __pyx_vtable_6pandas_5_libs_6sparse_BlockIndex.lookup = (Py_ssize_t (*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_lookup; __pyx_vtable_6pandas_5_libs_6sparse_BlockIndex.lookup_array = (PyArrayObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_lookup_array; __pyx_vtable_6pandas_5_libs_6sparse_BlockIndex.reindex = (PyArrayObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, PyArrayObject *, __pyx_t_5numpy_float64_t, struct __pyx_obj_6pandas_5_libs_6sparse_SparseIndex *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_reindex; __pyx_vtable_6pandas_5_libs_6sparse_BlockIndex.put = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_put; __pyx_vtable_6pandas_5_libs_6sparse_BlockIndex.take = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_5_libs_6sparse_10BlockIndex_take; __pyx_type_6pandas_5_libs_6sparse_BlockIndex.tp_base = __pyx_ptype_6pandas_5_libs_6sparse_SparseIndex; if (PyType_Ready(&__pyx_type_6pandas_5_libs_6sparse_BlockIndex) < 0) __PYX_ERR(0, 320, __pyx_L1_error) __pyx_type_6pandas_5_libs_6sparse_BlockIndex.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6sparse_BlockIndex.tp_dictoffset && __pyx_type_6pandas_5_libs_6sparse_BlockIndex.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6pandas_5_libs_6sparse_BlockIndex.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6sparse_BlockIndex.tp_dict, __pyx_vtabptr_6pandas_5_libs_6sparse_BlockIndex) < 0) __PYX_ERR(0, 320, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "BlockIndex", (PyObject *)&__pyx_type_6pandas_5_libs_6sparse_BlockIndex) < 0) __PYX_ERR(0, 320, __pyx_L1_error) if (__pyx_type_6pandas_5_libs_6sparse_BlockIndex.tp_weaklistoffset == 0) __pyx_type_6pandas_5_libs_6sparse_BlockIndex.tp_weaklistoffset = offsetof(struct __pyx_obj_6pandas_5_libs_6sparse_BlockIndex, __weakref__); __pyx_ptype_6pandas_5_libs_6sparse_BlockIndex = &__pyx_type_6pandas_5_libs_6sparse_BlockIndex; __pyx_vtabptr_6pandas_5_libs_6sparse_BlockMerge = &__pyx_vtable_6pandas_5_libs_6sparse_BlockMerge; __pyx_vtable_6pandas_5_libs_6sparse_BlockMerge._make_merged_blocks = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *))__pyx_f_6pandas_5_libs_6sparse_10BlockMerge__make_merged_blocks; __pyx_vtable_6pandas_5_libs_6sparse_BlockMerge._set_current_indices = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t, int))__pyx_f_6pandas_5_libs_6sparse_10BlockMerge__set_current_indices; if (PyType_Ready(&__pyx_type_6pandas_5_libs_6sparse_BlockMerge) < 0) __PYX_ERR(0, 625, __pyx_L1_error) __pyx_type_6pandas_5_libs_6sparse_BlockMerge.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6sparse_BlockMerge.tp_dictoffset && __pyx_type_6pandas_5_libs_6sparse_BlockMerge.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6pandas_5_libs_6sparse_BlockMerge.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6sparse_BlockMerge.tp_dict, __pyx_vtabptr_6pandas_5_libs_6sparse_BlockMerge) < 0) __PYX_ERR(0, 625, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "BlockMerge", (PyObject *)&__pyx_type_6pandas_5_libs_6sparse_BlockMerge) < 0) __PYX_ERR(0, 625, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pandas_5_libs_6sparse_BlockMerge) < 0) __PYX_ERR(0, 625, __pyx_L1_error) __pyx_ptype_6pandas_5_libs_6sparse_BlockMerge = &__pyx_type_6pandas_5_libs_6sparse_BlockMerge; __pyx_vtabptr_6pandas_5_libs_6sparse_BlockIntersection = &__pyx_vtable_6pandas_5_libs_6sparse_BlockIntersection; __pyx_vtable_6pandas_5_libs_6sparse_BlockIntersection.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6sparse_BlockMerge; __pyx_type_6pandas_5_libs_6sparse_BlockIntersection.tp_base = __pyx_ptype_6pandas_5_libs_6sparse_BlockMerge; if (PyType_Ready(&__pyx_type_6pandas_5_libs_6sparse_BlockIntersection) < 0) __PYX_ERR(0, 667, __pyx_L1_error) __pyx_type_6pandas_5_libs_6sparse_BlockIntersection.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6sparse_BlockIntersection.tp_dictoffset && __pyx_type_6pandas_5_libs_6sparse_BlockIntersection.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6pandas_5_libs_6sparse_BlockIntersection.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6sparse_BlockIntersection.tp_dict, __pyx_vtabptr_6pandas_5_libs_6sparse_BlockIntersection) < 0) __PYX_ERR(0, 667, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "BlockIntersection", (PyObject *)&__pyx_type_6pandas_5_libs_6sparse_BlockIntersection) < 0) __PYX_ERR(0, 667, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pandas_5_libs_6sparse_BlockIntersection) < 0) __PYX_ERR(0, 667, __pyx_L1_error) __pyx_ptype_6pandas_5_libs_6sparse_BlockIntersection = &__pyx_type_6pandas_5_libs_6sparse_BlockIntersection; __pyx_vtabptr_6pandas_5_libs_6sparse_BlockUnion = &__pyx_vtable_6pandas_5_libs_6sparse_BlockUnion; __pyx_vtable_6pandas_5_libs_6sparse_BlockUnion.__pyx_base = *__pyx_vtabptr_6pandas_5_libs_6sparse_BlockMerge; __pyx_vtable_6pandas_5_libs_6sparse_BlockUnion.__pyx_base._make_merged_blocks = (PyObject *(*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockMerge *))__pyx_f_6pandas_5_libs_6sparse_10BlockUnion__make_merged_blocks; __pyx_vtable_6pandas_5_libs_6sparse_BlockUnion._find_next_block_end = (__pyx_t_5numpy_int32_t (*)(struct __pyx_obj_6pandas_5_libs_6sparse_BlockUnion *, int))__pyx_f_6pandas_5_libs_6sparse_10BlockUnion__find_next_block_end; __pyx_type_6pandas_5_libs_6sparse_BlockUnion.tp_base = __pyx_ptype_6pandas_5_libs_6sparse_BlockMerge; if (PyType_Ready(&__pyx_type_6pandas_5_libs_6sparse_BlockUnion) < 0) __PYX_ERR(0, 673, __pyx_L1_error) __pyx_type_6pandas_5_libs_6sparse_BlockUnion.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pandas_5_libs_6sparse_BlockUnion.tp_dictoffset && __pyx_type_6pandas_5_libs_6sparse_BlockUnion.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6pandas_5_libs_6sparse_BlockUnion.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_6pandas_5_libs_6sparse_BlockUnion.tp_dict, __pyx_vtabptr_6pandas_5_libs_6sparse_BlockUnion) < 0) __PYX_ERR(0, 673, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "BlockUnion", (PyObject *)&__pyx_type_6pandas_5_libs_6sparse_BlockUnion) < 0) __PYX_ERR(0, 673, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pandas_5_libs_6sparse_BlockUnion) < 0) __PYX_ERR(0, 673, __pyx_L1_error) __pyx_ptype_6pandas_5_libs_6sparse_BlockUnion = &__pyx_type_6pandas_5_libs_6sparse_BlockUnion; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(4, 9, __pyx_L1_error) __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(3, 164, __pyx_L1_error) __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(3, 186, __pyx_L1_error) __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(3, 190, __pyx_L1_error) __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(3, 199, __pyx_L1_error) __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(3, 872, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if PY_MAJOR_VERSION < 3 #ifdef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC void #else #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #else #ifdef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyObject * #else #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #endif #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) #define CYTHON_SMALL_CODE __attribute__((optimize("Os"))) #else #define CYTHON_SMALL_CODE #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initsparse(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initsparse(void) #else __Pyx_PyMODINIT_FUNC PyInit_sparse(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_sparse(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { result = PyDict_SetItemString(moddict, to_name, value); Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static int __pyx_pymod_exec_sparse(PyObject *__pyx_pyinit_module) #endif #endif { PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __pyx_t_5numpy_float64_t __pyx_t_5; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0; #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_sparse(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("sparse", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #endif __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_pandas___libs__sparse) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "pandas._libs.sparse")) { if (unlikely(PyDict_SetItemString(modules, "pandas._libs.sparse", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /* "pandas/_libs/sparse.pyx":2 * # -*- coding: utf-8 -*- * import operator # <<<<<<<<<<<<<< * import sys * */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_operator, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_operator, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":3 * # -*- coding: utf-8 -*- * import operator * import sys # <<<<<<<<<<<<<< * * cimport cython */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":7 * cimport cython * * import numpy as np # <<<<<<<<<<<<<< * cimport numpy as cnp * from numpy cimport (ndarray, uint8_t, int64_t, int32_t, int16_t, int8_t, */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":11 * from numpy cimport (ndarray, uint8_t, int64_t, int32_t, int16_t, int8_t, * float64_t, float32_t) * cnp.import_array() # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 11, __pyx_L1_error) /* "pandas/_libs/sparse.pyx":14 * * * from distutils.version import LooseVersion # <<<<<<<<<<<<<< * * # numpy versioning */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_LooseVersion); __Pyx_GIVEREF(__pyx_n_s_LooseVersion); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_LooseVersion); __pyx_t_3 = __Pyx_Import(__pyx_n_s_distutils_version, __pyx_t_1, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_LooseVersion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_LooseVersion, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/_libs/sparse.pyx":17 * * # numpy versioning * _np_version = np.version.short_version # <<<<<<<<<<<<<< * _np_version_under1p10 = LooseVersion(_np_version) < LooseVersion('1.10') * _np_version_under1p11 = LooseVersion(_np_version) < LooseVersion('1.11') */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_short_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_np_version, __pyx_t_3) < 0) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/_libs/sparse.pyx":18 * # numpy versioning * _np_version = np.version.short_version * _np_version_under1p10 = LooseVersion(_np_version) < LooseVersion('1.10') # <<<<<<<<<<<<<< * _np_version_under1p11 = LooseVersion(_np_version) < LooseVersion('1.11') * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LooseVersion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LooseVersion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_np_version_under1p10, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pandas/_libs/sparse.pyx":19 * _np_version = np.version.short_version * _np_version_under1p10 = LooseVersion(_np_version) < LooseVersion('1.10') * _np_version_under1p11 = LooseVersion(_np_version) < LooseVersion('1.11') # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LooseVersion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LooseVersion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_np_version_under1p11, __pyx_t_3) < 0) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/_libs/sparse.pyx":25 * # Preamble stuff * * cdef float64_t NaN = np.NaN # <<<<<<<<<<<<<< * cdef float64_t INF = np.inf * */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_NaN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6pandas_5_libs_6sparse_NaN = ((__pyx_t_5numpy_float64_t)__pyx_t_5); /* "pandas/_libs/sparse.pyx":26 * * cdef float64_t NaN = np.NaN * cdef float64_t INF = np.inf # <<<<<<<<<<<<<< * * cdef inline int int_max(int a, int b): return a if a >= b else b */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_6pandas_5_libs_6sparse_INF = ((__pyx_t_5numpy_float64_t)__pyx_t_5); /* "pandas/_libs/sparse.pyx":801 * # Indexing operations * * def get_reindexer(ndarray[object, ndim=1] values, dict index_map): # <<<<<<<<<<<<<< * cdef object idx * cdef Py_ssize_t i */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6sparse_131get_reindexer, NULL, __pyx_n_s_pandas__libs_sparse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_reindexer, __pyx_t_3) < 0) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/_libs/sparse.pyx":848 * * * def reindex_integer(ndarray[float64_t, ndim=1] values, # <<<<<<<<<<<<<< * IntIndex sparse_index, * ndarray[int32_t, ndim=1] indexer): */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6sparse_133reindex_integer, NULL, __pyx_n_s_pandas__libs_sparse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reindex_integer, __pyx_t_3) < 0) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/_libs/sparse.pyx":857 * # SparseArray mask create operations * * def make_mask_object_ndarray(ndarray[object, ndim=1] arr, object fill_value): # <<<<<<<<<<<<<< * cdef object value * cdef Py_ssize_t i */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6sparse_135make_mask_object_ndarray, NULL, __pyx_n_s_pandas__libs_sparse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_mask_object_ndarray, __pyx_t_3) < 0) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_SparseIndex(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0xd41d8cd: * from pickle import PickleError as __pyx_PickleError */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6sparse_137__pyx_unpickle_SparseIndex, NULL, __pyx_n_s_pandas__libs_sparse); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SparseIndex, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":9 * __pyx_unpickle_SparseIndex__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_SparseIndex__set_state(SparseIndex __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[0]) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6sparse_139__pyx_unpickle_BlockMerge, NULL, __pyx_n_s_pandas__libs_sparse); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BlockMerge, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":1 * def __pyx_unpickle_BlockIntersection(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * if __pyx_checksum != 0x0ce6794: * from pickle import PickleError as __pyx_PickleError */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6sparse_141__pyx_unpickle_BlockIntersection, NULL, __pyx_n_s_pandas__libs_sparse); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BlockIntersection, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":9 * __pyx_unpickle_BlockIntersection__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BlockIntersection__set_state(BlockIntersection __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.result = __pyx_state[0]; __pyx_result.x = __pyx_state[1]; __pyx_result.xend = __pyx_state[2]; __pyx_result.xi = __pyx_state[3]; __pyx_result.xlen = __pyx_state[4]; __pyx_result.xstart = __pyx_state[5]; __pyx_result.y = __pyx_state[6]; __pyx_result.yend = __pyx_state[7]; __pyx_result.yi = __pyx_state[8]; __pyx_result.ylen = __pyx_state[9]; __pyx_result.ystart = __pyx_state[10] * if len(__pyx_state) > 11 and hasattr(__pyx_result, '__dict__'): */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6pandas_5_libs_6sparse_143__pyx_unpickle_BlockUnion, NULL, __pyx_n_s_pandas__libs_sparse); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BlockUnion, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pandas/_libs/sparse.pyx":1 * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<< * import operator * import sys */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "../../../Envs/pandas-dev/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1008 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init pandas._libs.sparse", 0, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pandas._libs.sparse"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* KeywordStringCheck */ static int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; } #endif /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { __Pyx_PyThreadState_declare Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; icurexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; if (unlikely(PyTuple_Check(err))) return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #endif /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) #else if (likely(PyString_Check(n))) #endif return __Pyx_PyObject_GetAttrStr(o, n); #endif return PyObject_GetAttr(o, n); } /* GetAttr3 */ static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); Py_INCREF(d); return d; } static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); } /* GetModuleGlobalName */ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); if (likely(result)) { Py_INCREF(result); } else if (unlikely(PyErr_Occurred())) { result = NULL; } else { #else result = PyDict_GetItem(__pyx_d, name); if (likely(result)) { Py_INCREF(result); } else { #endif #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(__Pyx_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } /* PyCFunctionFastCall */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { PyCFunctionObject *func = (PyCFunctionObject*)func_obj; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); int flags = PyCFunction_GET_FLAGS(func); assert(PyCFunction_Check(func)); assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, because it may clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL); } else { return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs); } } #endif /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL #include "frameobject.h" static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = f->f_localsplus; for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { return NULL; } if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallOneArg */ #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, &arg, 1); } #endif if (likely(PyCFunction_Check(func))) { if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); #if CYTHON_FAST_PYCCALL } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { return __Pyx_PyCFunction_FastCall(func, &arg, 1); #endif } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif /* PyObjectCallNoArg */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, NULL, 0); } #endif #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } } return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); } #endif /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* IterFinish */ static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } /* UnpackItemEndCheck */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } /* IsLittleEndian */ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) { union { uint32_t u32; uint8_t u8[4]; } S; S.u32 = 0x01020304; return S.u8[0] == 4; } /* BufferFormatCheck */ static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type) { stack[0].field = &ctx->root; stack[0].parent_offset = 0; ctx->root.type = type; ctx->root.name = "buffer dtype"; ctx->root.offset = 0; ctx->head = stack; ctx->head->field = &ctx->root; ctx->fmt_offset = 0; ctx->head->parent_offset = 0; ctx->new_packmode = '@'; ctx->enc_packmode = '@'; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->is_complex = 0; ctx->is_valid_array = 0; ctx->struct_alignment = 0; while (type->typegroup == 'S') { ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = 0; type = type->fields->type; } } static int __Pyx_BufFmt_ParseNumber(const char** ts) { int count; const char* t = *ts; if (*t < '0' || *t > '9') { return -1; } else { count = *t++ - '0'; while (*t >= '0' && *t < '9') { count *= 10; count += *t++ - '0'; } } *ts = t; return count; } static int __Pyx_BufFmt_ExpectNumber(const char **ts) { int number = __Pyx_BufFmt_ParseNumber(ts); if (number == -1) PyErr_Format(PyExc_ValueError,\ "Does not understand character buffer dtype format string ('%c')", **ts); return number; } static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { PyErr_Format(PyExc_ValueError, "Unexpected format string character: '%c'", ch); } static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { switch (ch) { case 'c': return "'char'"; case 'b': return "'signed char'"; case 'B': return "'unsigned char'"; case 'h': return "'short'"; case 'H': return "'unsigned short'"; case 'i': return "'int'"; case 'I': return "'unsigned int'"; case 'l': return "'long'"; case 'L': return "'unsigned long'"; case 'q': return "'long long'"; case 'Q': return "'unsigned long long'"; case 'f': return (is_complex ? "'complex float'" : "'float'"); case 'd': return (is_complex ? "'complex double'" : "'double'"); case 'g': return (is_complex ? "'complex long double'" : "'long double'"); case 'T': return "a struct"; case 'O': return "Python object"; case 'P': return "a pointer"; case 's': case 'p': return "a string"; case 0: return "end"; default: return "unparseable format string"; } } static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return 2; case 'i': case 'I': case 'l': case 'L': return 4; case 'q': case 'Q': return 8; case 'f': return (is_complex ? 8 : 4); case 'd': return (is_complex ? 16 : 8); case 'g': { PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); return 0; } case 'O': case 'P': return sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { switch (ch) { case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(short); case 'i': case 'I': return sizeof(int); case 'l': case 'L': return sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(float) * (is_complex ? 2 : 1); case 'd': return sizeof(double) * (is_complex ? 2 : 1); case 'g': return sizeof(long double) * (is_complex ? 2 : 1); case 'O': case 'P': return sizeof(void*); default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } typedef struct { char c; short x; } __Pyx_st_short; typedef struct { char c; int x; } __Pyx_st_int; typedef struct { char c; long x; } __Pyx_st_long; typedef struct { char c; float x; } __Pyx_st_float; typedef struct { char c; double x; } __Pyx_st_double; typedef struct { char c; long double x; } __Pyx_st_longdouble; typedef struct { char c; void *x; } __Pyx_st_void_p; #ifdef HAVE_LONG_LONG typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_st_float) - sizeof(float); case 'd': return sizeof(__Pyx_st_double) - sizeof(double); case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } /* These are for computing the padding at the end of the struct to align on the first member of the struct. This will probably the same as above, but we don't have any guarantees. */ typedef struct { short x; char c; } __Pyx_pad_short; typedef struct { int x; char c; } __Pyx_pad_int; typedef struct { long x; char c; } __Pyx_pad_long; typedef struct { float x; char c; } __Pyx_pad_float; typedef struct { double x; char c; } __Pyx_pad_double; typedef struct { long double x; char c; } __Pyx_pad_longdouble; typedef struct { void *x; char c; } __Pyx_pad_void_p; #ifdef HAVE_LONG_LONG typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { switch (ch) { case 'c': return 'H'; case 'b': case 'h': case 'i': case 'l': case 'q': case 's': case 'p': return 'I'; case 'B': case 'H': case 'I': case 'L': case 'Q': return 'U'; case 'f': case 'd': case 'g': return (is_complex ? 'C' : 'R'); case 'O': return 'O'; case 'P': return 'P'; default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { if (ctx->head == NULL || ctx->head->field == &ctx->root) { const char* expected; const char* quote; if (ctx->head == NULL) { expected = "end"; quote = ""; } else { expected = ctx->head->field->type->name; quote = "'"; } PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected %s%s%s but got %s", quote, expected, quote, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); } else { __Pyx_StructField* field = ctx->head->field; __Pyx_StructField* parent = (ctx->head - 1)->field; PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), parent->type->name, field->name); } } static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { char group; size_t size, offset, arraysize = 1; if (ctx->enc_type == 0) return 0; if (ctx->head->field->type->arraysize[0]) { int i, ndim = 0; if (ctx->enc_type == 's' || ctx->enc_type == 'p') { ctx->is_valid_array = ctx->head->field->type->ndim == 1; ndim = 1; if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %zu", ctx->head->field->type->arraysize[0], ctx->enc_count); return -1; } } if (!ctx->is_valid_array) { PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", ctx->head->field->type->ndim, ndim); return -1; } for (i = 0; i < ctx->head->field->type->ndim; i++) { arraysize *= ctx->head->field->type->arraysize[i]; } ctx->is_valid_array = 0; ctx->enc_count = 1; } group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); do { __Pyx_StructField* field = ctx->head->field; __Pyx_TypeInfo* type = field->type; if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); } else { size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); } if (ctx->enc_packmode == '@') { size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); size_t align_mod_offset; if (align_at == 0) return -1; align_mod_offset = ctx->fmt_offset % align_at; if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; if (ctx->struct_alignment == 0) ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, ctx->is_complex); } if (type->size != size || type->typegroup != group) { if (type->typegroup == 'C' && type->fields != NULL) { size_t parent_offset = ctx->head->parent_offset + field->offset; ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = parent_offset; continue; } if ((type->typegroup == 'H' || group == 'H') && type->size == size) { } else { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } } offset = ctx->head->parent_offset + field->offset; if (ctx->fmt_offset != offset) { PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); return -1; } ctx->fmt_offset += size; if (arraysize) ctx->fmt_offset += (arraysize - 1) * size; --ctx->enc_count; while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; } ctx->head->field = ++field; if (field->type == NULL) { --ctx->head; field = ctx->head->field; continue; } else if (field->type->typegroup == 'S') { size_t parent_offset = ctx->head->parent_offset + field->offset; if (field->type->fields->type == NULL) continue; field = field->type->fields; ++ctx->head; ctx->head->field = field; ctx->head->parent_offset = parent_offset; break; } else { break; } } } while (ctx->enc_count); ctx->enc_type = 0; ctx->is_complex = 0; return 0; } static PyObject * __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) { const char *ts = *tsp; int i = 0, number; int ndim = ctx->head->field->type->ndim; ; ++ts; if (ctx->new_count != 1) { PyErr_SetString(PyExc_ValueError, "Cannot handle repeated arrays in format string"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; while (*ts && *ts != ')') { switch (*ts) { case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; default: break; } number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) return PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %d", ctx->head->field->type->arraysize[i], number); if (*ts != ',' && *ts != ')') return PyErr_Format(PyExc_ValueError, "Expected a comma in format string, got '%c'", *ts); if (*ts == ',') ts++; i++; } if (i != ndim) return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", ctx->head->field->type->ndim, i); if (!*ts) { PyErr_SetString(PyExc_ValueError, "Unexpected end of format string, expected ')'"); return NULL; } ctx->is_valid_array = 1; ctx->new_count = 1; *tsp = ++ts; return Py_None; } static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { int got_Z = 0; while (1) { switch(*ts) { case 0: if (ctx->enc_type != 0 && ctx->head == NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; if (ctx->head != NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } return ts; case ' ': case '\r': case '\n': ++ts; break; case '<': if (!__Pyx_Is_Little_Endian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_Is_Little_Endian()) { PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '=': case '@': case '^': ctx->new_packmode = *ts++; break; case 'T': { const char* ts_after_sub; size_t i, struct_count = ctx->new_count; size_t struct_alignment = ctx->struct_alignment; ctx->new_count = 1; ++ts; if (*ts != '{') { PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; ctx->enc_count = 0; ctx->struct_alignment = 0; ++ts; ts_after_sub = ts; for (i = 0; i != struct_count; ++i) { ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); if (!ts_after_sub) return NULL; } ts = ts_after_sub; if (struct_alignment) ctx->struct_alignment = struct_alignment; } break; case '}': { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; if (alignment && ctx->fmt_offset % alignment) { ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); } } return ts; case 'x': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->fmt_offset += ctx->new_count; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->enc_packmode = ctx->new_packmode; ++ts; break; case 'Z': got_Z = 1; ++ts; if (*ts != 'f' && *ts != 'd' && *ts != 'g') { __Pyx_BufFmt_RaiseUnexpectedChar('Z'); return NULL; } CYTHON_FALLTHROUGH; case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'g': case 'O': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; ctx->new_count = 1; got_Z = 0; ++ts; break; } CYTHON_FALLTHROUGH; case 's': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_count = ctx->new_count; ctx->enc_packmode = ctx->new_packmode; ctx->enc_type = *ts; ctx->is_complex = got_Z; ++ts; ctx->new_count = 1; got_Z = 0; break; case ':': ++ts; while(*ts != ':') ++ts; ++ts; break; case '(': if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; break; default: { int number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; ctx->new_count = (size_t)number; } } } } /* BufferGetAndValidate */ static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (unlikely(info->buf == NULL)) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_ZeroBuffer(Py_buffer* buf) { buf->buf = NULL; buf->obj = NULL; buf->strides = __Pyx_zeros; buf->shape = __Pyx_zeros; buf->suboffsets = __Pyx_minusones; } static int __Pyx__GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { buf->buf = NULL; if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) { __Pyx_ZeroBuffer(buf); return -1; } if (unlikely(buf->ndim != nd)) { PyErr_Format(PyExc_ValueError, "Buffer has wrong number of dimensions (expected %d, got %d)", nd, buf->ndim); goto fail; } if (!cast) { __Pyx_BufFmt_Context ctx; __Pyx_BufFmt_Init(&ctx, stack, dtype); if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; } if (unlikely((unsigned)buf->itemsize != dtype->size)) { PyErr_Format(PyExc_ValueError, "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", buf->itemsize, (buf->itemsize > 1) ? "s" : "", dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); goto fail; } if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; return 0; fail:; __Pyx_SafeReleaseBuffer(buf); return -1; } /* BufferFallbackError */ static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } /* BufferIndexError */ static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { PyObject *runerr; Py_ssize_t key_value; PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; if (unlikely(!(m && m->sq_item))) { PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); return NULL; } key_value = __Pyx_PyIndex_AsSsize_t(index); if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); } if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { PyErr_Clear(); PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); } return NULL; } static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; if (likely(m && m->mp_subscript)) { return m->mp_subscript(obj, key); } return __Pyx_PyObject_GetIndex(obj, key); } #endif /* ArgTypeTest */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } else if (exact) { #if PY_MAJOR_VERSION == 2 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(__Pyx_TypeCheck(obj, type))) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); #ifdef _MSC_VER else state = (PyGILState_STATE)-1; #endif #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(1); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a + b); if (likely((x^a) >= 0 || (x^b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_add(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_add(op1, op2); } } x = a + b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla + llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("add", return NULL) result = ((double)a) + (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #endif /* None */ static CYTHON_INLINE long __Pyx_div_long(long a, long b) { long q = a / b; long r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } /* None */ static CYTHON_INLINE __pyx_t_5numpy_float64_t __Pyx_mod___pyx_t_5numpy_float64_t(__pyx_t_5numpy_float64_t a, __pyx_t_5numpy_float64_t b) { __pyx_t_5numpy_float64_t r = fmod(a, b); r += ((r != 0) & ((r < 0) ^ (b < 0))) * b; return r; } /* None */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t a, __pyx_t_5numpy_int64_t b) { __pyx_t_5numpy_int64_t q = a / b; __pyx_t_5numpy_int64_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } /* None */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_mod___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t a, __pyx_t_5numpy_int64_t b) { __pyx_t_5numpy_int64_t r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } /* DictGetItem */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { PyObject* args = PyTuple_Pack(1, key); if (likely(args)) PyErr_SetObject(PyExc_KeyError, args); Py_XDECREF(args); } return NULL; } Py_INCREF(value); return value; } #endif /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* HasAttr */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, "hasattr(): attribute name must be string"); return -1; } r = __Pyx_GetAttr(o, n); if (unlikely(!r)) { PyErr_Clear(); return 0; } else { Py_DECREF(r); return 1; } } /* RaiseNoneIterError */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if PY_VERSION_HEX >= 0x030700A2 *type = tstate->exc_state.exc_type; *value = tstate->exc_state.exc_value; *tb = tstate->exc_state.exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; #endif Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if PY_VERSION_HEX >= 0x030700A2 tmp_type = tstate->exc_state.exc_type; tmp_value = tstate->exc_state.exc_value; tmp_tb = tstate->exc_state.exc_traceback; tstate->exc_state.exc_type = type; tstate->exc_state.exc_value = value; tstate->exc_state.exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { #endif PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE #if PY_VERSION_HEX >= 0x030700A2 tmp_type = tstate->exc_state.exc_type; tmp_value = tstate->exc_state.exc_value; tmp_tb = tstate->exc_state.exc_traceback; tstate->exc_state.exc_type = local_type; tstate->exc_state.exc_value = local_value; tstate->exc_state.exc_traceback = local_tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* CallNextTpTraverse */ static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_traverse != current_tp_traverse) type = type->tp_base; while (type && type->tp_traverse == current_tp_traverse) type = type->tp_base; if (type && type->tp_traverse) return type->tp_traverse(obj, v, a); return 0; } /* CallNextTpClear */ static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_clear != current_tp_clear) type = type->tp_base; while (type && type->tp_clear == current_tp_clear) type = type->tp_base; if (type && type->tp_clear) type->tp_clear(obj); } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'%.50s' object has no attribute '%U'", tp->tp_name, attr_name); #else "'%.50s' object has no attribute '%.400s'", tp->tp_name, PyString_AS_STRING(attr_name)); #endif return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name); if (likely(name_attr)) { ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); } else { ret = -1; } if (unlikely(ret < 0)) { PyErr_Clear(); ret = 0; } Py_XDECREF(name_attr); return ret; } static int __Pyx_setup_reduce(PyObject* type_obj) { int ret = 0; PyObject *object_reduce = NULL; PyObject *object_reduce_ex = NULL; PyObject *reduce = NULL; PyObject *reduce_ex = NULL; PyObject *reduce_cython = NULL; PyObject *setstate = NULL; PyObject *setstate_cython = NULL; #if CYTHON_USE_PYTYPE_LOOKUP if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; #else if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; #endif #if CYTHON_USE_PYTYPE_LOOKUP object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; #else object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; #endif reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; #else object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; } PyType_Modified((PyTypeObject*)type_obj); } } goto GOOD; BAD: if (!PyErr_Occurred()) PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); ret = -1; GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); #endif Py_XDECREF(reduce); Py_XDECREF(reduce_ex); Py_XDECREF(reduce_cython); Py_XDECREF(setstate); Py_XDECREF(setstate_cython); return ret; } /* SetVTable */ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); #endif if (!ob) goto bad; if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback); } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (PyObject_Not(use_cline) != 0) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) { const npy_int32 neg_one = (npy_int32) -1, const_zero = (npy_int32) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(npy_int32) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int32) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(npy_int32) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(npy_int32), little, !is_unsigned); } } /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } if ((0)) {} else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); view->obj = NULL; Py_DECREF(obj); } #endif /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value) { const npy_int64 neg_one = (npy_int64) -1, const_zero = (npy_int64) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(npy_int64) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(npy_int64) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(npy_int64) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(npy_int64), little, !is_unsigned); } } /* None */ static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_pow___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t b, __pyx_t_5numpy_int64_t e) { __pyx_t_5numpy_int64_t t = b; switch (e) { case 3: t *= b; CYTHON_FALLTHROUGH; case 2: t *= b; CYTHON_FALLTHROUGH; case 1: return t; case 0: return 1; } #if 1 if (unlikely(e<0)) return 0; #endif t = 1; while (likely(e)) { t *= (b * (e&1)) | ((~e)&1); b *= b; e >>= 1; } return t; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } /* Declarations */ #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); } #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return x + y*(__pyx_t_float_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { __pyx_t_float_complex z; z.real = x; z.imag = y; return z; } #endif /* Arithmetic */ #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } #if 1 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { if (b.imag == 0) { return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); } else if (fabsf(b.real) >= fabsf(b.imag)) { if (b.real == 0 && b.imag == 0) { return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); } else { float r = b.imag / b.real; float s = 1.0 / (b.real + b.imag * r); return __pyx_t_float_complex_from_parts( (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); } } else { float r = b.real / b.imag; float s = 1.0 / (b.imag + b.real * r); return __pyx_t_float_complex_from_parts( (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); } } #else static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { if (b.imag == 0) { return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); } else { float denom = b.real * b.real + b.imag * b.imag; return __pyx_t_float_complex_from_parts( (a.real * b.real + a.imag * b.imag) / denom, (a.imag * b.real - a.real * b.imag) / denom); } } #endif static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrtf(z.real*z.real + z.imag*z.imag); #else return hypotf(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { float denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prod_float(a, a); return __Pyx_c_prod_float(a, a); case 3: z = __Pyx_c_prod_float(a, a); return __Pyx_c_prod_float(z, a); case 4: z = __Pyx_c_prod_float(a, a); return __Pyx_c_prod_float(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } else if (b.imag == 0) { z.real = powf(a.real, b.real); z.imag = 0; return z; } else if (a.real > 0) { r = a.real; theta = 0; } else { r = -a.real; theta = atan2f(0, -1); } } else { r = __Pyx_c_abs_float(a); theta = atan2f(a.imag, a.real); } lnr = logf(r); z_r = expf(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cosf(z_theta); z.imag = z_r * sinf(z_theta); return z; } #endif #endif /* Declarations */ #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); } #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return x + y*(__pyx_t_double_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { __pyx_t_double_complex z; z.real = x; z.imag = y; return z; } #endif /* Arithmetic */ #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } #if 1 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { if (b.imag == 0) { return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); } else if (fabs(b.real) >= fabs(b.imag)) { if (b.real == 0 && b.imag == 0) { return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); } else { double r = b.imag / b.real; double s = 1.0 / (b.real + b.imag * r); return __pyx_t_double_complex_from_parts( (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); } } else { double r = b.real / b.imag; double s = 1.0 / (b.imag + b.real * r); return __pyx_t_double_complex_from_parts( (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); } } #else static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { if (b.imag == 0) { return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); } else { double denom = b.real * b.real + b.imag * b.imag; return __pyx_t_double_complex_from_parts( (a.real * b.real + a.imag * b.imag) / denom, (a.imag * b.real - a.real * b.imag) / denom); } } #endif static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrt(z.real*z.real + z.imag*z.imag); #else return hypot(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { double denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prod_double(a, a); return __Pyx_c_prod_double(a, a); case 3: z = __Pyx_c_prod_double(a, a); return __Pyx_c_prod_double(z, a); case 4: z = __Pyx_c_prod_double(a, a); return __Pyx_c_prod_double(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } else if (b.imag == 0) { z.real = pow(a.real, b.real); z.imag = 0; return z; } else if (a.real > 0) { r = a.real; theta = 0; } else { r = -a.real; theta = atan2(0, -1); } } else { r = __Pyx_c_abs_double(a); theta = atan2(a.imag, a.real); } lnr = log(r); z_r = exp(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cos(z_theta); z.imag = z_r * sin(z_theta); return z; } #endif #endif /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(enum NPY_TYPES) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(enum NPY_TYPES) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) { const npy_int32 neg_one = (npy_int32) -1, const_zero = (npy_int32) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(npy_int32) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int32, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (npy_int32) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (npy_int32) 0; case 1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, digits[0]) case 2: if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) >= 2 * PyLong_SHIFT) { return (npy_int32) (((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); } } break; case 3: if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) >= 3 * PyLong_SHIFT) { return (npy_int32) (((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); } } break; case 4: if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __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]))) } else if (8 * sizeof(npy_int32) >= 4 * PyLong_SHIFT) { return (npy_int32) (((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (npy_int32) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(npy_int32) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (npy_int32) 0; case -1: __PYX_VERIFY_RETURN_INT(npy_int32, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, +digits[0]) case -2: if (8 * sizeof(npy_int32) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { return (npy_int32) (((npy_int32)-1)*(((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; case 2: if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { return (npy_int32) ((((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; case -3: if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { return (npy_int32) (((npy_int32)-1)*(((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; case 3: if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { return (npy_int32) ((((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; case -4: if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __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]))) } else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) { return (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]))); } } break; case 4: if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __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]))) } else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) { return (npy_int32) ((((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); } } break; } #endif if (sizeof(npy_int32) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int32, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int32, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else npy_int32 val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (npy_int32) -1; } } else { npy_int32 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (npy_int32) -1; val = __Pyx_PyInt_As_npy_int32(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to npy_int32"); return (npy_int32) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int32"); return (npy_int32) -1; } /* CIntFromPy */ static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) { const npy_int64 neg_one = (npy_int64) -1, const_zero = (npy_int64) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(npy_int64) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_int64, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (npy_int64) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (npy_int64) 0; case 1: __PYX_VERIFY_RETURN_INT(npy_int64, digit, digits[0]) case 2: if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int64) >= 2 * PyLong_SHIFT) { return (npy_int64) (((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])); } } break; case 3: if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int64) >= 3 * PyLong_SHIFT) { return (npy_int64) (((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])); } } break; case 4: if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int64) >= 4 * PyLong_SHIFT) { return (npy_int64) (((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (npy_int64) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(npy_int64) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (npy_int64) 0; case -1: __PYX_VERIFY_RETURN_INT(npy_int64, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(npy_int64, digit, +digits[0]) case -2: if (8 * sizeof(npy_int64) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) { return (npy_int64) (((npy_int64)-1)*(((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]))); } } break; case 2: if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) { return (npy_int64) ((((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]))); } } break; case -3: if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) { return (npy_int64) (((npy_int64)-1)*(((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]))); } } break; case 3: if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) { return (npy_int64) ((((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]))); } } break; case -4: if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) { return (npy_int64) (((npy_int64)-1)*(((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]))); } } break; case 4: if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) { return (npy_int64) ((((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]))); } } break; } #endif if (sizeof(npy_int64) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int64, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(npy_int64, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else npy_int64 val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (npy_int64) -1; } } else { npy_int64 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (npy_int64) -1; val = __Pyx_PyInt_As_npy_int64(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to npy_int64"); return (npy_int64) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_int64"); return (npy_int64) -1; } /* CIntFromPy */ static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *x) { const npy_uint8 neg_one = (npy_uint8) -1, const_zero = (npy_uint8) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(npy_uint8) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(npy_uint8, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (npy_uint8) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (npy_uint8) 0; case 1: __PYX_VERIFY_RETURN_INT(npy_uint8, digit, digits[0]) case 2: if (8 * sizeof(npy_uint8) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_uint8) >= 2 * PyLong_SHIFT) { return (npy_uint8) (((((npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0])); } } break; case 3: if (8 * sizeof(npy_uint8) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_uint8) >= 3 * PyLong_SHIFT) { return (npy_uint8) (((((((npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0])); } } break; case 4: if (8 * sizeof(npy_uint8) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_uint8) >= 4 * PyLong_SHIFT) { return (npy_uint8) (((((((((npy_uint8)digits[3]) << PyLong_SHIFT) | (npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (npy_uint8) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(npy_uint8) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(npy_uint8) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (npy_uint8) 0; case -1: __PYX_VERIFY_RETURN_INT(npy_uint8, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(npy_uint8, digit, +digits[0]) case -2: if (8 * sizeof(npy_uint8) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_uint8, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_uint8) - 1 > 2 * PyLong_SHIFT) { return (npy_uint8) (((npy_uint8)-1)*(((((npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); } } break; case 2: if (8 * sizeof(npy_uint8) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_uint8) - 1 > 2 * PyLong_SHIFT) { return (npy_uint8) ((((((npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); } } break; case -3: if (8 * sizeof(npy_uint8) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_uint8, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_uint8) - 1 > 3 * PyLong_SHIFT) { return (npy_uint8) (((npy_uint8)-1)*(((((((npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); } } break; case 3: if (8 * sizeof(npy_uint8) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_uint8) - 1 > 3 * PyLong_SHIFT) { return (npy_uint8) ((((((((npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); } } break; case -4: if (8 * sizeof(npy_uint8) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_uint8, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_uint8) - 1 > 4 * PyLong_SHIFT) { return (npy_uint8) (((npy_uint8)-1)*(((((((((npy_uint8)digits[3]) << PyLong_SHIFT) | (npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); } } break; case 4: if (8 * sizeof(npy_uint8) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(npy_uint8) - 1 > 4 * PyLong_SHIFT) { return (npy_uint8) ((((((((((npy_uint8)digits[3]) << PyLong_SHIFT) | (npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); } } break; } #endif if (sizeof(npy_uint8) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(npy_uint8) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else npy_uint8 val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (npy_uint8) -1; } } else { npy_uint8 val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (npy_uint8) -1; val = __Pyx_PyInt_As_npy_uint8(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to npy_uint8"); return (npy_uint8) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to npy_uint8"); return (npy_uint8) -1; } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; if (!res) { res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } return res; } #endif static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) { if (likely(err == exc_type)) return 1; if (likely(PyExceptionClass_Check(err))) { return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type); } return PyErr_GivenExceptionMatches(err, exc_type); } static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) { if (likely(err == exc_type1 || err == exc_type2)) return 1; if (likely(PyExceptionClass_Check(err))) { return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2); } return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2)); } #endif /* CheckBinaryVersion */ static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } /* ModuleImport */ #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; PyObject *py_module = 0; py_name = __Pyx_PyIdentifier_FromString(name); if (!py_name) goto bad; py_module = PyImport_Import(py_name); Py_DECREF(py_name); return py_module; bad: Py_XDECREF(py_name); return 0; } #endif /* TypeImport */ #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); py_name = 0; Py_DECREF(py_module); py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (!strict && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd", module_name, class_name, basicsize, size); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd", module_name, class_name, basicsize, size); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif /* InitStrings */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type %.200s). " "The ability to return an instance of a strict subclass of int " "is deprecated, and may be removed in a future version of Python.", Py_TYPE(result)->tp_name)) { Py_DECREF(result); return NULL; } return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", type_name, type_name, Py_TYPE(result)->tp_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */